https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113788
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Yes, seems that currently we only check that it's the first specifier: /* Special case for "this" specifier, indicating a parm is an xobj parm. The "this" specifier must be the first specifier in the declaration, after any attributes. */ if (token->keyword == RID_THIS) { cp_lexer_consume_token (parser->lexer); if (token != first_specifier) but I guess we should also check we're processing a parameter-declaration.