[Bug c++/105398] [11/12 Regression][ICE] enum in array in lambda
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 26 19:33:32 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105398
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The patch above changed
- if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type
+ if (TREE_CODE (template_type) == ENUMERAL_TYPE
+ && !uses_template_parms (current_nonlambda_scope ())
&& !DECL_ALIAS_TEMPLATE_P (gen_tmpl))
but here current_nonlambda_scope () is ::, a NAMESPACE_DECL, which doesn't have
a type, so is considered type-dependent. So we don't call tsubst_enum. That
doesn't look right.
More information about the Gcc-bugs
mailing list