aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJoe Buck <jbuck@synopsys.com>2002-11-29 22:08:36 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2002-11-29 22:08:36 +0000
commitf6a83eb0a77977814adcb11f74141b0ff175a52f (patch)
treec1ac37997171ec2cbf8e8fd3495824679f8ef59d /gcc/cp
parentff944b4986e98b09d1c300ad3f41ed89313aa915 (diff)
downloadgcc-f6a83eb0a77977814adcb11f74141b0ff175a52f.zip
gcc-f6a83eb0a77977814adcb11f74141b0ff175a52f.tar.gz
gcc-f6a83eb0a77977814adcb11f74141b0ff175a52f.tar.bz2
anon2.C: New test.
* g++.dg/lookup/anon2.C: New test. * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for anonymous structs. From-SVN: r59647
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/parse.y2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d22e538..7ff2a31 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-29 Joe Buck <jbuck@synopsys.com>
+
+ * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
+ anonymous structs.
+
2002-11-29 Mark Mitchell <mark@codesourcery.com>
* class.c (walk_subobject_offsets): Recur on binfos as well as on
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index 78cf991..0be461e 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -2524,6 +2524,8 @@ class_head_defn:
make_anon_name (),
0));
$$.new_type_flag = 0;
+ CLASSTYPE_DECLARED_CLASS (TREE_TYPE ($$.t))
+ = $1 == class_type_node;
yyungetc ('{', 1);
}
;