Commit b7975aed by Mark Mitchell Committed by Mark Mitchell

semantics.c (begin_class_definition): Call build_self_reference.

	* semantics.c (begin_class_definition): Call build_self_reference.
	(finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.

From-SVN: r25672
parent 1e61a9d9
1999-03-10 Mark Mitchell <mark@markmitchell.com> 1999-03-10 Mark Mitchell <mark@markmitchell.com>
* semantics.c (begin_class_definition): Call build_self_reference.
(finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
* search.c (assert_canonical_unmarked): Fix typo in prototype. * search.c (assert_canonical_unmarked): Fix typo in prototype.
* search.c (dfs_canonical_queue): New function. * search.c (dfs_canonical_queue): New function.
......
...@@ -1327,6 +1327,9 @@ begin_class_definition (t) ...@@ -1327,6 +1327,9 @@ begin_class_definition (t)
that we can get it back later. */ that we can get it back later. */
begin_tree (); begin_tree ();
/* Make a declaration for this class in its own scope. */
build_self_reference ();
return t; return t;
} }
...@@ -1365,11 +1368,6 @@ finish_member_declaration (decl) ...@@ -1365,11 +1368,6 @@ finish_member_declaration (decl)
finish_struct. Presumably it is already set as the function is finish_struct. Presumably it is already set as the function is
parsed. Perhaps DECL_CLASS_CONTEXT is already set, too? */ parsed. Perhaps DECL_CLASS_CONTEXT is already set, too? */
DECL_CLASS_CONTEXT (decl) = current_class_type; DECL_CLASS_CONTEXT (decl) = current_class_type;
else if (TREE_CODE (decl) == TYPE_DECL)
/* Historically, DECL_CONTEXT was not set for a TYPE_DECL in
finish_struct, so we do not do it here either. Perhaps we
should, though. */
;
else else
DECL_CONTEXT (decl) = current_class_type; DECL_CONTEXT (decl) = current_class_type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment