[Bug middle-end/98484] missing -Wstringop-overflow on invalid accesses to the same object by distinct functions

2021-09-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98484

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-09-26
 Ever confirmed|0   |1

--- Comment #2 from Andrew Pinski  ---
Confirmed. -Wsystem-headers enables all of the warnings ...

What is interesting is in GCC 10, we don't even get the warning for g0 without
-Wsystem-headers.
In GCC 9 -Wsystem-headers does not enable the warning for g1 or g2 either.

[Bug middle-end/98484] missing -Wstringop-overflow on invalid accesses to the same object by distinct functions

2020-12-30 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98484

Martin Sebor  changed:

   What|Removed |Added

Summary|missing -Wstringop-overflow |missing -Wstringop-overflow
   |on a multiply inlined calls |on invalid accesses to the
   |from system header  |same object by distinct
   ||functions

--- Comment #1 from Martin Sebor  ---
Actually, the warning is issued if the accessed object is different, so the
false negative is most likely due to the TREE_NO_WARNING bit and not related to
inlining or system headers.  It might be okay to issue just one warning for
multiple invalid accesses to the same object in a single (out-of-line)
function, but the suppression should probably be reset for each new
(out-of-line) function.