RTTI/Exceptions bug in the latest egcs snapshot?

Tudor Hulubei tudor@cs.unh.edu
Sat Feb 14 21:53:00 GMT 1998


Hi,

I've noticed that the following program generates a segfault if
compiled with -fno-rtti with the latest egcs (i updated my cvs tree
this morning).  I think this problem appeared two snapshots ago, but
I'm not sure.  Anyway, the program works fine with gcc-2.8.0.

#include <stdexcept>

int
main()
{
    try
    {
	throw invalid_argument("");
    }
    catch (invalid_argument& e) {}

    return 0;
}

The binary compiled with `c++ -fno-rtti t.cc' segfaults when the
exception is caught.

The binary compiled with `c++ t.cc' works fine.

Hope this helps,
Tudor



More information about the Gcc mailing list