I've got gcc-4.1.3_20070305, also compiled from ports, and it should
definitely support native ObjC exceptions (especially since I was able
to get them to work with the command in my first email). I've attached
gnustep-make's config.log, but I found something interesting about the
failed program:
#include <stdlib.h>
#include <objc/Object.h>
int main(int argc, char **argv)
{
Object *o=nil;
@try
{
o=[Object new];
@throw o;
}
@catch (id foo)
{
if (o!=foo)
return 1;
}
return 0;
}
I saved this as 'conftest.c' and then compiled with the same command
that configure used:
gcc41 -o conftest -O2 -pipe -x objective-c -I. -fgnu-runtime
-fobjc-exceptions conftest.c -lobjc -pthread
The program crashed, as expected. However, on a whim I renamed
'conftest.c' to 'conftest.m', recompiled, and it ran! I thought the
file extension didn't matter when the language is manually specified
with -x as above, so what could be going on here? I'm also emailing my
config.log to the FreeBSD port's maintainer, but at this point I'm not
sure whether it's an issue with gnustep-make, its FreeBSD port, or
even gcc itself. Can somebody shine some light on this?