[PR c/84293] Unexpected strict-alias warning
commitd9757bb67f5aa70766f288a2fd24e5434fd49c42
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Feb 2018 19:31:10 +0000 (9 19:31 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Feb 2018 19:31:10 +0000 (9 19:31 +0000)
treedfe37130c665a88b85c0d08c740c2ba447b3cedc
parent2c92f3e31a247f5b7d56925bdd5e1e8125da3043
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257539 138bc75d-0d04-0410-961f-82ee72b054a4
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]