https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80131
--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- And even with unsigned c, a shift by (30 - 0xffffffffU) is perfectly valid in C; that shift count evaluates to 31U. Whereas a shift by 0xffffffffU is not valid C.