extern bool grok_ctor_properties (const_tree, const_tree);
extern bool grok_op_properties (tree, bool);
extern tree xref_tag (enum tag_types, tree, tag_scope, bool);
-extern tree xref_tag_from_type (tree, tree, tag_scope);
extern void xref_basetypes (tree, tree);
extern tree start_enum (tree, tree, tree, tree, bool, bool *);
extern void finish_enum_value_list (tree);
return ret;
}
-
-tree
-xref_tag_from_type (tree old, tree id, tag_scope scope)
-{
- enum tag_types tag_kind;
-
- if (TREE_CODE (old) == RECORD_TYPE)
- tag_kind = (CLASSTYPE_DECLARED_CLASS (old) ? class_type : record_type);
- else
- tag_kind = union_type;
-
- if (id == NULL_TREE)
- id = TYPE_IDENTIFIER (old);
-
- return xref_tag (tag_kind, id, scope, false);
-}
-
/* Create the binfo hierarchy for REF with (possibly NULL) base list
BASE_LIST. For each element on BASE_LIST the TREE_PURPOSE is an
access_* node, and the TREE_VALUE is the type of the base-class.
&& !PRIMARY_TEMPLATE_P (gen_tmpl)
&& !LAMBDA_TYPE_P (TREE_TYPE (gen_tmpl))
&& TREE_CODE (CP_DECL_CONTEXT (gen_tmpl)) == NAMESPACE_DECL)
- {
- found = xref_tag_from_type (TREE_TYPE (gen_tmpl),
- DECL_NAME (gen_tmpl),
- /*tag_scope=*/ts_global);
- return found;
- }
+ /* This occurs when the user has tried to define a tagged type
+ in a scope that forbids it. We emitted an error during the
+ parse. We didn't complete the bail out then, so here we
+ are. */
+ return error_mark_node;
context = DECL_CONTEXT (gen_tmpl);
if (context && TYPE_P (context))