https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84378

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-02-19
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to petschy from comment #0)
> In both cases there is some misleading 'noise' in the diagnostics.

The problem is that the ambiguity means the declarator can't be parsed, so it
gets given a type of 'void', which then triggers further errors where 'void'
isn't allowed.

In this specific case the ambiguity could be tentatively resolved in favour of
the valid type (i.e. assume the typedef-name is meant, because that gives a
valid function type) which would prevent the misleading noise. But that's
probably not possible in the general case, so maybe we should just stop
checking for errors after the ambiguity is found.

Reply via email to