https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119117
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >This got broken by the C2y if declarations implementation (PR c/117019, commit >440be01). No it was broken before that; just now exposed by it because it thinks `unknown * b` will be a declaration but in this case unknown is the same as `self->unknown`. The way unknown gets resolved later on to be self->unknown is not happening. Note it is only an issue with `*` here and that makes me think the patch for PR 20385 caused it. I will take a look on how to fix this later this week. But the issue is here: ``` /* Try to detect an unknown type name when we have "A B" or "A *B". */ if (c_parser_peek_token (parser)->type == CPP_NAME && c_parser_peek_token (parser)->id_kind == C_ID_ID && (c_parser_peek_2nd_token (parser)->type == CPP_NAME || c_parser_peek_2nd_token (parser)->type == CPP_MULT) && (!nested || !lookup_name (c_parser_peek_token (parser)->value))) ``` Specifically for the CPP_MULT case. I suspect there needs to a check to see if we are inside a Objective-C method or not; similarly how nested is handled.