This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: (lack of) Thread-safe exceptions on AIX (gcc-2.95.1)
- To: gcc at gcc dot gnu dot org
- Subject: Re: (lack of) Thread-safe exceptions on AIX (gcc-2.95.1)
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Mon, 31 Jan 2000 14:06:52 -0500
>>>>> Marc Lehmann writes:
Marc> Could you send an example, if you have one?
I am not an expert on Microsoft C Structured Exception Handling,
but it basically is the same syntax as in the C++ standard (adapted from
Modula-2+).
The additional keywords are:
try
except
finally
leave
Here are some examples that someone sent me a long time ago:
try {
do {
try {
delta = f(delta, ...);
}
except (GetExceptionCode() == STATUS_FLOATING_OVERFLOW) {
delta = 0.0;
}
} while (delta > epsilon);
}
except (1) {
return failure_status;
}
try {
// initialize resources, no allocation
try {
// allocate resources
// do work
}
finally {
// free resources
}
}
except (GetExceptionCode() == FAIL) {
// log error
return failure;
}
return success;
David