From: Mark Mitchell Date: Wed, 10 Mar 1999 17:58:08 +0000 (+0000) Subject: semantics.c (begin_class_definition): Call build_self_reference. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b7975aedf6113725502bcc8327ace12c7bf568aa;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d1c731c23cd..2c7eace4e64 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 1999-03-10 Mark Mitchell + * 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. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 076197a70c8..6471fd15866 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -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;