aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-11-15 11:59:07 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-11-15 11:59:07 +0000
commit71631a1f1ce6cba9b823cb48a2bff17e97e2664f (patch)
treeb6ff16dc9d8af462973b8cea045e7c79c3d7b84a /gcc/cp
parenteab0c1ab23e6ab6f37af519150a22f6b3129c452 (diff)
downloadgcc-71631a1f1ce6cba9b823cb48a2bff17e97e2664f.zip
gcc-71631a1f1ce6cba9b823cb48a2bff17e97e2664f.tar.gz
gcc-71631a1f1ce6cba9b823cb48a2bff17e97e2664f.tar.bz2
typeck.c (lookup_anon_field): Cope with qv qualifiers.
cp/ * typeck.c (lookup_anon_field): Cope with qv qualifiers. testsuite/ * g++.old-deja/g++.other/anon5.C: New test. From-SVN: r37478
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/typeck.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6589da1..881ad2b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
+
+ * typeck.c (lookup_anon_field): Cope with qv qualifiers.
+
2000-11-14 Mark Mitchell <mark@codesourcery.com>
* class.c (build_vtbl_initializer): Fix typo in comment.
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index eca1c29..d0ca2bb 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -1994,7 +1994,7 @@ lookup_anon_field (t, type)
/* If we find it directly, return the field. */
if (DECL_NAME (field) == NULL_TREE
- && type == TREE_TYPE (field))
+ && type == TYPE_MAIN_VARIANT (TREE_TYPE (field)))
{
return field;
}