https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84764
Daniel Lundin <daniel.lundin.mail at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.lundin.mail at gmail dot co | |m --- Comment #3 from Daniel Lundin <daniel.lundin.mail at gmail dot com> --- This is a bug as in the wrong text is displayed in the diagnostic message. gcc picks `__int128` and it is not an unsigned type. Decimal integer constants use the the quoted list in 6.4.4.1: `int` then `long` then `long long`. Therefore this normative text (from C99 to C23) applies: "If all of the types in the list for the constant are signed, the extended integer type shall be signed." gcc behaves just like required too, since `__int128` ought to be one of the extended integer types and it is signed. I would guess this message is some remain from C90 where extended integer types didn't exist. Compiling with -std=c90 adds an additional warning "warning: this decimal constant is unsigned only in ISO C90". It would appear that this is the correct warning that should always be displayed. Seems to be a minor bug that occurred during the switch (gcc 5.0.0) from gnu90 to gnu11 as default option.