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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.11.17 22:22:55
     Ever Confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-11-17 
22:22:55 UTC ---
struct Base
{
    virtual int getid() = 0;
};


struct A : public Base
{
    virtual int getid() { return 1; }
};

struct B : public Base
{
    virtual int getid() { throw "here"; }
};

int main()
{
    A a;
    B b;

    Base& ar = a;

    ar.getid();  // throws
}

Only fails with 4.6.0 and -std=c++0x

Reply via email to