[PR c/84293] Unexpected strict-alias warning
authorNathan Sidwell <nathan@acm.org>
Fri, 9 Feb 2018 19:31:10 +0000 (19:31 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Fri, 9 Feb 2018 19:31:10 +0000 (19:31 +0000)
commit0444aa9c0a3357707624263ec2fd13d8f156016e
treedfe37130c665a88b85c0d08c740c2ba447b3cedc
parentdd2799cc2212a72a1b31828918f9bb9287ab9780
[PR c/84293] Unexpected strict-alias warning

https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00510.html
PR c/84293
gcc/c/
* c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
to strict_aliasing_warning.

gcc/c-family/
* c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
arg.
* c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
arg.  Adjust.

gcc/cp/
* typeck.c (cp_build_indirect_ref_1, build_reinterpret_cast_1):
Pass expr location to strict_aliasing_warning.

gcc/testsuite/
* c-c++-common/pr84293.h: New.
* c-c++-common/pr84293.c: New.

From-SVN: r257539
gcc/c-family/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/c-warn.c
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/pr84293.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/pr84293.h [new file with mode: 0644]