https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104113
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > from decl.cc: > > if (type_was_error_mark_node && template_parm_flag) > /* FIXME we should be able to propagate the error_mark_node as is > for other contexts too. */ > type = error_mark_node; > else > type = integer_type_node; Changing this to not check template_parm_flag causes a regression in g++.dg/other/nontype-1.C . What happens is the type that happens here is now error_mark_node but the parser is not exacting that still. We get instead: ``` t1.cc:3:37: error: expected ‘)’ before ‘,’ token 3 | Op::first_argument_type a, // { dg-error "not a type" } | ^ | ) t1.cc:2:11: note: to match this ‘(’ 2 | bool asfun(Op f, | ^ ``` Which is totally bad error recovery ...