The following code should not abort:
struct vbase {};

struct foo : virtual vbase {
    foo() {
        throw "exception in foo ctor";
    }

};

main()
{
    struct bar :  public foo {};
    try {
        bar a;
    }
    catch ( ... ) {
    }
    return 0;

};

----

This is forwarded from:
http://gcc.gnu.org/ml/gcc/2005-09/msg00253.html


-- 
           Summary: [3.4/4.0/4.1 Regression] virtual base class cause
                    exception not to be caught
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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

Reply via email to