https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108499
Andrew Pinski changed:
What|Removed |Added
Keywords||needs-bisection
--- Comment #4 from And
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108499
--- Comment #3 from Stephen ---
False positives with this will just lead to proliferation of -Wno-array-bounds,
which doesn't help.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108499
--- Comment #2 from Stephen ---
> There is no way to figure out for the compiler that theSize is not zero
> either.
There is no way for the compiler to figure out that theSize *is* zero.
We have warnings -Wmaybe-uninitialized and -Wuninitiali
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108499
--- Comment #1 from Andrew Pinski ---
Adding:
if (!theSize)
__builtin_unreachable();
After the declaration of theSize, fixes the warning.
I don't know if in the original code there was a check for zero theSize or not
but the warning di