[Bug middle-end/95140] [10/11 Regression] bogus -Wstringop-overflow for a loop unrolled past the end of a trailing array
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95140 Richard Biener changed: What|Removed |Added Target Milestone|10.2|10.3 --- Comment #5 from Richard Biener --- GCC 10.2 is released, adjusting target milestone.
[Bug middle-end/95140] [10/11 Regression] bogus -Wstringop-overflow for a loop unrolled past the end of a trailing array
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95140 Richard Biener changed: What|Removed |Added Target Milestone|--- |10.2 Priority|P3 |P2
[Bug middle-end/95140] [10/11 Regression] bogus -Wstringop-overflow for a loop unrolled past the end of a trailing array
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95140 --- Comment #4 from Martin Sebor --- No. GCC's manual recommends using either flexible array members or zero-length arrays, and explicitly discourages abuses of arrays of length one (nothing is said about any such exceptions for larger arrays): Although using one-element arrays this way is discouraged, GCC handles accesses to trailing one-element array members analogously to zero-length arrays. Legacy code that misuses arrays of larger bounds either needs to be updated to use the recommended solutions or it can suppress the warning using one of the provided mechanisms. Otherwise, undefined code will be increasingly diagnosed (in line with the reporter's expectation).
[Bug middle-end/95140] [10/11 Regression] bogus -Wstringop-overflow for a loop unrolled past the end of a trailing array
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95140 --- Comment #3 from Jakub Jelinek --- The warning should change, not the conservative assumption. There is a lot of code in the wild with such trailing arrays, not everything uses flexible array members, [0] or [1] for that.
[Bug middle-end/95140] [10/11 Regression] bogus -Wstringop-overflow for a loop unrolled past the end of a trailing array
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95140 Martin Sebor changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=92110 --- Comment #2 from Martin Sebor --- See also pr92110 for a report of redundant -Wstringop-overflow instances due to loop unrolling. A single warning should suffice (especially when it's a false positive).
[Bug middle-end/95140] [10/11 Regression] bogus -Wstringop-overflow for a loop unrolled past the end of a trailing array
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95140 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |NEW Keywords||diagnostic, ||missed-optimization URL||https://bugzilla.redhat.com ||/show_bug.cgi?id=1835906 Known to fail||10.1.0, 11.0 Ever confirmed|0 |1 Last reconfirmed||2020-05-14 --- Comment #1 from Martin Sebor --- The missed-optimization keyword is for the unnecessary loop unrolling.