[Bug c/101446] -Wpedantic causes an error with zero size array

2021-07-14 Thread joseph at codesourcery dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101446 --- Comment #8 from joseph at codesourcery dot com --- I think this is a bug. Negative-size arrays are an unconditional error. Zero-size arrays should be a pedwarn-if-pedantic, regardless of whether the 0 is explicit or deduced from an initi

[Bug c/101446] -Wpedantic causes an error with zero size array

2021-07-14 Thread ismail at i10z dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101446 --- Comment #7 from İsmail Dönmez --- Well, it's even more confusing, grepping through glibc build log: ../include/stdlib.h:297:8: warning: ISO C forbids zero-size array 'msg' [-Wpedantic] 297 | char msg[0]; |^~~ ../inet/netin

[Bug c/101446] -Wpedantic causes an error with zero size array

2021-07-14 Thread ismail at i10z dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101446 --- Comment #6 from İsmail Dönmez --- (In reply to Richard Biener from comment #4) > -Wpedantic was added as fix for PR44774 to make -Werror=pedantic work > (as opposed to -Werror=edantic) The problem is that it's inconsistent, here is a list o

[Bug c/101446] -Wpedantic causes an error with zero size array

2021-07-14 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101446 Richard Biener changed: What|Removed |Added Last reconfirmed||2021-07-14 Status|RESOLVED

[Bug c/101446] -Wpedantic causes an error with zero size array

2021-07-14 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101446 --- Comment #4 from Richard Biener --- -Wpedantic was added as fix for PR44774 to make -Werror=pedantic work (as opposed to -Werror=edantic)

[Bug c/101446] -Wpedantic causes an error with zero size array

2021-07-14 Thread ismail at i10z dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101446 --- Comment #3 from İsmail Dönmez --- (In reply to Richard Biener from comment #2) > -Wpedantic is the same as -pedantic and that affects correctness of programs. > > @item -Wpedantic > @itemx -pedantic > @opindex pedantic > @opindex Wpedantic

[Bug c/101446] -Wpedantic causes an error with zero size array

2021-07-14 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101446 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/101446] -Wpedantic causes an error with zero size array

2021-07-14 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101446 --- Comment #1 from Jonathan Wakely --- It's been that way since GCC 4.1 at least.