https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117021
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |jsm28 at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So the new paragraph "The arithmetic values specified by a constant range expression shall not change as a result of conversion to the promoted type of the controlling expression." isn't there or has been modified in some way? Because the above feels like at least pedwarn-ish. There is no similar wording for single case values, so say void foo (unsigned x) { switch (x) { case -1: break; case ~0U + 1ULL: break; } } we just give -Woverflow warning on the latter and don't warn at all on the former. On void bar (unsigned x) { switch (x) { case -2 ... -1: break; case ~0U + 1ULL ... ~0U + 2ULL: break; } } we currently just warn twice on the latter and don't warn at all on the former (if not counting the -Wpedantic pedwarn that will go away for -std=c2y/-std=gnu2y).