[Bug c/66422] -Warray-bounds false positive with -O3
gajjanagadde at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 4 22:16:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66422
--- Comment #2 from Ganesh Ajjanagadde <gajjanagadde at gmail dot com> ---
But myfoo->foo_size is not set within the foo_loop function.
For instance, myfoo->foo_size could be set outside the function boundary,
and then the function could be called (say foo_size = 3 or 4).
This is represented by the get_foo() function.
Then, as long as the programmer guarantees that when this function is called,
myfoo->foo_size is always <= 4, there is certainly no error.
Furthermore, note that I put a < 3 condition as opposed to a <= 3.
More information about the Gcc-bugs
mailing list