https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104319
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 52338 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52338&action=edit gcc12-pr104319.patch Improved patch. The error recovery doesn't work well for some reason though as can be seen on the spurious extra errors, unfortunately no idea why is that because the ugly hack of overwriting token->type clearly works at least for the supported C++11 and later case of z<A<int>> = 0; But at least the first errors are now clearer.