[Bug c/66397] sanitize=undefined triggers extra -Warray-bounds warning
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 3 11:56:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66397
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Comment on attachment 35691
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35691
testcase, warns with gcc-6 -c -O2 -fsanitize=undefined
Except it is undefined behavior to have one element before the start of an
array. And that is why it is warning. Does not matter if there is a ++ later
on.
More information about the Gcc-bugs
mailing list