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

--- Comment #3 from Frank Heckenbach <f.heckenb...@fh-soft.de> ---
> Except C++ parsing does not allow for that because C++ parsing requires
> unlimited look ahead.

While that's true in general, I think in specific cases (including most
real-world cases), the look-ahead required is limited. E.g., here, I think it's
clear the program is ill-formed at the ";" at the latest, perhaps even at the
"{}" already.

Even if gcc can't determine the cause of the error, I'd prefer if it said so
rather than chosing one (IMHO unlikely) candidate for correction. (Is there
actually a primary-expression that could be inserted there to make the program
correct, or would this only lead to the next error?)

Reply via email to