cp/
* typeck.c (lookup_anon_field): Cope with qv qualifiers.
testsuite/
* g++.old-deja/g++.other/anon5.C: New test.
From-SVN: r37478
+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.
/* 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;
}
+2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.other/anon5.C: New test.
+
2000-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc.dg/c90-const-expr-2.c, gcc.dg/c99-const-expr-2.c: Add more
--- /dev/null
+// Build don't link:
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 14 Nov 2000 <nathan@codesourcery.com>
+
+// Bug 649. A cv qualified anonymous union would cause confusion.
+
+struct X
+{
+ int fn () const
+ {
+ return member;
+ }
+ const union
+ {
+ int member;
+ };
+};