[Bug c++/95725] Confusing error diagnostic in an invalid template
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 17 18:58:50 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95725
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |msebor at gcc dot gnu.org
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
The diagnostic is usually for false positive/negative warnings or wrong
information in diagnostic messages. It's not normally used for internal
compiler errors. But I don't see an ICE on trunk with this test case, just
errors (so diagnostic would seem appropriate). At the same time, the latest
GCC output seems reasonable. Clang prints something similar:
pr95725.C:1:20: error: expected expression
template <decltype(= ;
^
pr95725.C:1:22: error: expected expression
template <decltype(= ;
^
pr95725.C:1:22: error: expected ',' or '>' in template-parameter-list
pr95725.C:1:22: warning: declaration does not declare anything
[-Wmissing-declarations]
1 warning and 3 errors generated.
I'm not sure there's a lot to improve here.
More information about the Gcc-bugs
mailing list