[Bug c/87857] case label does not reduce to an integer constant

2018-11-01 Thread stsp at users dot sourceforge.net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87857 --- Comment #3 from Stas Sergeev --- So a clang bug? I wonder if ubsan is supposed to produce the compile-time errors, rather than the run-time warnings. Would it be possible to downgrade this to a compile-time warning, and/or add a switch to dis

[Bug c/87857] case label does not reduce to an integer constant

2018-11-01 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87857 --- Comment #2 from Andreas Schwab --- 1<<31 is undefined in C, but not in C++ (since C++14).

[Bug c/87857] case label does not reduce to an integer constant

2018-11-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87857 --- Comment #1 from Andrew Pinski --- 1 << 31 is undefined for C99 ...