[Bug c/105156] No diagnostic for `enum { toobig = UINT_MAX }`

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

[Bug c/105156] No diagnostic for `enum { toobig = UINT_MAX }`

2022-04-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105156 --- Comment #5 from Jonathan Wakely --- There are loads of similar bugs related to macros in system headers such as NULL and UINT_MAX.

[Bug c/105156] No diagnostic for `enum { toobig = UINT_MAX }`

2022-04-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105156 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c/105156] No diagnostic for `enum { toobig = UINT_MAX }`

2022-04-04 Thread Keith.S.Thompson at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105156 --- Comment #4 from Keith Thompson --- OK, that explains the bug. It sounds like the code that suppresses warnings in system headers needs to be a bit more clever. Using UINT_MAX here isn't an error in the header.

[Bug c/105156] No diagnostic for `enum { toobig = UINT_MAX }`

2022-04-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105156 --- Comment #3 from Andrew Pinski --- Add -Wsystem-headers and you will get a warning.

[Bug c/105156] No diagnostic for `enum { toobig = UINT_MAX }`

2022-04-04 Thread Keith.S.Thompson at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105156 --- Comment #2 from Keith Thompson --- Andrew, did you use "-std=c17 -pedantic-errors"? Both gcc and clang correctly diagnose "enum { toobig = 0x7fff * 2U + 1U };". I'm seeing weird behavior that I don't understand. Replacing the UINT_MAX m

[Bug c/105156] No diagnostic for `enum { toobig = UINT_MAX }`

2022-04-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105156 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic --- Comment #1 from Andrew P