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
This commit is contained in:
Mark Mitchell 1999-03-10 17:58:08 +00:00 committed by Mark Mitchell
parent 1e61a9d952
commit b7975aedf6
2 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,8 @@
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 (dfs_canonical_queue): New function.

View File

@ -1327,6 +1327,9 @@ begin_class_definition (t)
that we can get it back later. */
begin_tree ();
/* Make a declaration for this class in its own scope. */
build_self_reference ();
return t;
}
@ -1365,11 +1368,6 @@ finish_member_declaration (decl)
finish_struct. Presumably it is already set as the function is
parsed. Perhaps DECL_CLASS_CONTEXT is already set, too? */
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
DECL_CONTEXT (decl) = current_class_type;