This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/18289] New: GCC3.4.2 selects incorrect function overload when an ellipsis overload is available


GCC 3.4.2 selects an overload that requires an inaccessible conversion when an
ellipsis function overload is available

Platform is Cygwin on Windows 2000.

See the example below.

class A {};
class B : public A {};
class C : private A {};

void f(...);
void f(A*);
void error()
{
  f(static_cast<B*>(0));
  f(static_cast<C*>(0)); // <- Line 42
}

Conversion.cc: In function `void error()':
Conversion.cc:42: error: `A' is an inaccessible base of `C'

-- 
           Summary: GCC3.4.2 selects incorrect function overload when an
                    ellipsis overload is available
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aleethorp at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18289


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]