This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
c++ exception spec bug
- To: gcc at gcc dot gnu dot org
- Subject: c++ exception spec bug
- From: SmartList <list at utumno dot student dot utwente dot nl>
- Date: Sun, 7 Jan 2001 23:20:43 +0100
Using -fomit-frame-pointer in combinations with (restrictive) exceptions
specs doesn't work correctly in the latest gcc cvs tree.
This piece of code aborts incorrectly (it should catch):
class dummy {
int x;
public:
dummy(void) throw() : x(0) {}
~dummy(void) {}
};
void thrower(void) throw(int) {
dummy dobj;
throw 10;
}
int main(void) throw() {
try {
thrower();
} catch(int) {
}
}
Replacing 'void thrower(void) throw(int)' with 'void thrower(void)' fixes
this. Strangely, turning on the -fno-enforce-eh-specs also fixes the abort,
not sure whether the object gets destructed though, using
-fno-enforce-eh-specs doesn't work for the larger sources I've tried.
Thomas
--