mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-22 00:29:36 +08:00
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
This commit is contained in:
parent
eab0c1ab23
commit
71631a1f1c
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
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
|
||||
|
17
gcc/testsuite/g++.old-deja/g++.other/anon5.C
Normal file
17
gcc/testsuite/g++.old-deja/g++.other/anon5.C
Normal file
@ -0,0 +1,17 @@
|
||||
// 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;
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user