https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90124

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #7)
> (In reply to Marek Polacek from comment #6)
> > The operand of the decltype specifier is an unevaluated operand and perhaps
> > we have to take that into account here.
> 
> ...i.e., naming of objects does not, by itself, require that a definition be
> provided.  This should fix it:
> 
> --- a/gcc/cp/typeck.c
> +++ b/gcc/cp/typeck.c
> @@ -2478,6 +2478,7 @@ build_class_member_access_expr (cp_expr object, tree
> member,
>          must: we don't know how to refer to a base member before layout is
>          complete.  But still don't complain in a template.  */
>       if (!dependent_type_p (object_type)
> +         && !cp_unevaluated_operand
>           && !complete_type_or_maybe_complain (object_type, object,
>                            complain))
>         return error_mark_node;

Looks good.

Reply via email to