Commit 71631a1f by Nathan Sidwell Committed by Nathan Sidwell

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
parent eab0c1ab
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;
}
......
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
......
// 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;
};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment