https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121133
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 61984 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61984&action=edit gcc16-pr121133.patch The following patch handles the long long cases like the C FE, but I have no idea what to do about the 3 commented out cases like (__extension__ 1LL). The problem is that the C++ FE lexes everything upfront and the error is during the lexing. The C FE only lexes the next token or whatever is needed, so it lexes the 1LL in (__extension__ 1LL) when warn_long_long is disabled. During lexing we can detect __extension__ but can't find out when its effects should stop.