[Bug c/84293] system-header macro expansion location gives unexpected warning

2018-02-09 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84293

Nathan Sidwell  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Nathan Sidwell  ---
Fixed r257539.

[Bug c/84293] system-header macro expansion location gives unexpected warning

2018-02-09 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84293

--- Comment #3 from Nathan Sidwell  ---
Author: nathan
Date: Fri Feb  9 19:31:10 2018
New Revision: 257539

URL: https://gcc.gnu.org/viewcvs?rev=257539=gcc=rev
Log:
[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.

Added:
trunk/gcc/testsuite/c-c++-common/pr84293.c
trunk/gcc/testsuite/c-c++-common/pr84293.h
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.h
trunk/gcc/c-family/c-warn.c
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-typeck.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog

[Bug c/84293] system-header macro expansion location gives unexpected warning

2018-02-08 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84293

Nathan Sidwell  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-02-08
   Assignee|unassigned at gcc dot gnu.org  |nathan at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Nathan Sidwell  ---
IRC conversation with shows it's not the macro expansion stuff being confused,
but the alias checking using the wrong loc

[Bug c/84293] system-header macro expansion location gives unexpected warning

2018-02-08 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84293

--- Comment #1 from Nathan Sidwell  ---
Created attachment 43380
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43380=edit
header file