On Wed, 11 Nov 2020, Jakub Jelinek via Gcc-patches wrote: > So indeed, 0x80 << 24 is UB in C99/C11 and C++98, unclear in C89 and > well defined in C++11 and later. I don't know if C2X is considering > mandating two's complement and making it well defined like C++20 did.
C2x requires two's complement but that's only about representation; there are no changes so far to what shifts are undefined. -- Joseph S. Myers jos...@codesourcery.com