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++/16889] New: regression from 2.95.3: ambiguity is not detected


Ambiguity is not detected in this code:

// start of code
class B {
public:
    B* p;
    B* f();
    virtual ~B();
};

class B1 : virtual public B {
};

class B2 : virtual public B {
};

class B3 : public B {
};

class BB : public B1, public B2, public B3 {
};

#include <iostream>

B*
B::f ()
{
    std::cout << this << std::endl;

    return this;
}

B::~B()
{
    std::cout << this << ".~B()" << std::endl;
}

int
main ()
{
    BB b;
    b.B1::f();
    b.B2::f();
    b.B3::f();
    b.f();
}
// end of code

2.95.3 correctly rejects this code.

-- 
           Summary: regression from 2.95.3: ambiguity is not detected
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dvv at gcc dot dvv dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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