Mail Archives: pgcc/2000/07/07/14:21:52
Hi,
there is a bug in pgcc-2.95.2 19991024 (release) when compiling
code that uses exception-handling with optimization levels of
5 and above (see very simple program at the end).
I think that this comes from the omit-frame-pointer optimization
that is automatically included with -O5. The compiler should
at least print an error message or disable "omit-frame-pointer"
when it encounters exception handling code. However, with
"gcc version egcs-2.91.66", it runs fine even with the option
enabled.
Greetings,
Dirk Farin
PS.: Please include my email-address as CC as I'm not on the list.
This program segfaults with -O5 and above:
#include <iostream.h>
#include <iomanip.h>
main()
{
try
{
throw "FOO";
}
catch(const char* txt)
{
cout << txt << endl;
}
}
- Raw text -