https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98355
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org --- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> --- My earlier fix to emit sorry rather than ICE didn't catch this case; this patch fixes that: --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -8934,7 +8934,7 @@ cp_parser_has_attribute_expression (cp_parser *parser) { if (oper == error_mark_node) /* Nothing. */; - else if (type_dependent_expression_p (oper)) + else if (uses_template_parms (oper)) sorry_at (atloc, "%<__builtin_has_attribute%> with dependent argument " "not supported yet"); else