diff options
author | Mark Mitchell <mark@codesourcery.com> | 2002-10-17 22:35:49 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2002-10-17 22:35:49 +0000 |
commit | 982216be8cdc37d13e47d74f794fc70c7cf30c2f (patch) | |
tree | 5cdba7989d8cddde4acdc126e1fbda9376d48428 /gcc/cp/class.c | |
parent | 2d05cd9641e0746ad5c6824e458acd014ecdf849 (diff) | |
download | gcc-982216be8cdc37d13e47d74f794fc70c7cf30c2f.zip gcc-982216be8cdc37d13e47d74f794fc70c7cf30c2f.tar.gz gcc-982216be8cdc37d13e47d74f794fc70c7cf30c2f.tar.bz2 |
re PR c++/7584 (Erroneous ambiguous base error on using declaration)
PR c++/7584
* class.c (handle_using_decl): Allow the declaration used to be
from an ambiguous base.
PR c++/7584
* g++.dg/inherit/using3.C: New test.
From-SVN: r58262
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 59f5ce3..90d7ef2 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -1155,9 +1155,12 @@ handle_using_decl (using_decl, t) tree flist = NULL_TREE; tree old_value; - binfo = binfo_or_else (ctype, t); + binfo = lookup_base (t, ctype, ba_any, NULL); if (! binfo) - return; + { + error_not_base_type (t, ctype); + return; + } if (constructor_name_p (name, ctype)) { |