+2011-06-17 Jason Merrill <jason@redhat.com>
+
+ * semantics.c (finish_non_static_data_member): Preserve dereference
+ in template.
+
2011-06-16 Jason Merrill <jason@redhat.com>
PR c++/44160
tree type = TREE_TYPE (decl);
if (TREE_CODE (type) == REFERENCE_TYPE)
- type = TREE_TYPE (type);
+ /* Quals on the object don't matter. */;
else
{
/* Set the cv qualifiers. */
type = cp_build_qualified_type (type, quals);
}
- return build_min (COMPONENT_REF, type, object, decl, NULL_TREE);
+ return (convert_from_reference
+ (build_min (COMPONENT_REF, type, object, decl, NULL_TREE)));
}
/* If PROCESSING_TEMPLATE_DECL is nonzero here, then
QUALIFYING_SCOPE is also non-null. Wrap this in a SCOPE_REF