https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65132
--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #1) > Probably it is just a matter of calling cp_parser_constant_expression with > the right parameters to not emit errors, then checking after it returns that > it indeed parsed a constant-expression and give appropriate errors otherwise. Which is what the C++ parser needs to do in general to avoid the terribly user-unfriendly "expected...before" diagnostics, particularly the infamous 'expected primary-expression before...' PR39858. We really need at lot more people working on the C++ parser...