https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108580
--- Comment #2 from postmaster at raasu dot org --- If I try to shift to highest bit of signed type, the compiler will reject the code and that is correct behaviour. The point here is that left-hand side of the shift operation is by default same size as "int", as in 32 bits, which means it can't be promoted to "int" again. This behaviour is same with gcc, clang and Visual C++, but Visual C++ correctly gives warning that the code is ambiguous (exact message is "Arithmetic overflow"), however it's also C++ compiler, which might validate the code with C++ rules, not C.