diff options
author | Mark Mitchell <mark@markmitchell.com> | 1999-03-10 17:58:08 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-03-10 17:58:08 +0000 |
commit | b7975aedf6113725502bcc8327ace12c7bf568aa (patch) | |
tree | 0051d4dcb001b40feda8bab18279561ee87c825a /gcc | |
parent | 1e61a9d9525b97af480e78ce0d6effbcf2386edd (diff) | |
download | gcc-b7975aedf6113725502bcc8327ace12c7bf568aa.zip gcc-b7975aedf6113725502bcc8327ace12c7bf568aa.tar.gz gcc-b7975aedf6113725502bcc8327ace12c7bf568aa.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d1c731c..2c7eace 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 076197a..6471fd1 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; |