[Bug c/106929] declaration in switch-case doesn't fail since GCC 11

2022-09-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106929 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #5

[Bug c/106929] declaration in switch-case doesn't fail since GCC 11

2022-09-13 Thread sigmaepsilon92 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106929 --- Comment #4 from Michael Zimmermann --- Interesting, but IMO it should still fail if you specify an older C standard e.g. using `-std=c89`, but currently it doesn't.

[Bug c/106929] declaration in switch-case doesn't fail since GCC 11

2022-09-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106929 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/106929] declaration in switch-case doesn't fail since GCC 11

2022-09-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106929 --- Comment #2 from Jonathan Wakely --- For C17 (and previous standards), if you use -pedantic you'll get a warning, and -pedantic-errors will make it an error.

[Bug c/106929] declaration in switch-case doesn't fail since GCC 11

2022-09-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106929 --- Comment #1 from Jonathan Wakely --- This changed with r11-4813 and is intentional: C Parser: Implement mixing of labels and code. Implement mixing of labels and code as adopted for C2X and process some std-attributes on labels.