https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113839
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Frank Heckenbach from comment #0) > While I appreciate gcc trying to by helpful, it seems it goes wrong rather > often. That doesn't match my experience. The errors that mention a specific grammar production tend to be accurate, with the odd exception like this bug (which will get fixed). I find the problem is that telling the user that a particular grammar production (like "unqualified-id" or "primary-expression") is expected isn't really helpful to the layperson who doesn't memorize the BNF-like grammar in the standard. Clang tends to do a better job in that regard, balancing accuracy with comprehensibility. If you encounter cases where a diagnostic is misleading, wrong, or just unhelpfully technical in its wording, please do report them so they can be improved.