https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121938
--- Comment #13 from post+gcc at ralfj dot de --- > if GCC did what the warning said it did Yeah that is a key point here. If the warning said "this is UB, all bets are off", then I'd still wonder why it wasn't made a hard error but I'd be less surprised. But here GCC says "integer constant is so large that it is unsigned" without actually making it unsigned (and making it unsigned manually avoids the odd behavior, as noted by Andrew).