]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/7584 (Erroneous ambiguous base error on using declaration)
authorMark Mitchell <mark@codesourcery.com>
Thu, 17 Oct 2002 22:37:49 +0000 (22:37 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 17 Oct 2002 22:37:49 +0000 (22:37 +0000)
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: r58264

gcc/cp/ChangeLog
gcc/cp/class.c
gcc/testsuite/ChangeLog

index 48bf9dd942cf1522d0622d8a7bf257b4e2f46394..930966887957c1de22794085f81d65ccd004c851 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-17  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/7584
+       * class.c (handle_using_decl): Allow the declaration used to be
+       from an ambiguous base.
+
 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/7478
index 2395d794bfc7118cf807720565738d046127e501..9ae0cf14419572b8981139eb69f0745be6390a2d 100644 (file)
@@ -1150,9 +1150,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 (name == constructor_name (ctype)
       || name == constructor_name_full (ctype))
index 7445b2c1127ef49747cd286321e3e2162a09226e..7129c2f5d420f6249e6bb8484e65e23c6889b1bd 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-17  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/7584
+       * g++.dg/inherit/using3.C: New test.
+
 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/7478