[Bug tree-optimization/108499] False positive -Warray-bounds

2025-04-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108499 Andrew Pinski changed: What|Removed |Added Keywords||needs-bisection --- Comment #4 from And

[Bug tree-optimization/108499] False positive -Warray-bounds

2023-01-24 Thread steveire at gmail dot com via Gcc-bugs
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.

[Bug tree-optimization/108499] False positive -Warray-bounds

2023-01-24 Thread steveire at gmail dot com via Gcc-bugs
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

[Bug tree-optimization/108499] False positive -Warray-bounds

2023-01-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
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