------- Comment #1 from redi at gcc dot gnu dot org  2009-08-26 15:31 -------
Reduced:

#include <cassert>
#include <exception>

struct GoodE {
    GoodE()
    {
        try {
            throw 1;
        } catch (...) {
        }
    }
};

struct BadE {
    BadE()
        try {
            throw 1;
        } catch (...) {
        }
};

int main()
{
    try {
        throw GoodE();
    } catch (...) {
        assert( !std::uncaught_exception() );
    }

    try {
        throw BadE();
    } catch (...) {
        assert( !std::uncaught_exception() );
    }
}

Note that GoodE doesn't cause the problem. The difference is that BadE has a
function-try-block


-- 


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

Reply via email to