mirror of
https://github.com/gnustep/tools-make.git
synced 2025-05-30 00:41:14 +00:00
Don't depend on the existence of Object class for checking whether exceptions work.
Nicola: this test passes, but then configure decides to override the result because it thinks that my gcc won't work, even after testing that it does. My autoconf-fu is weak, so maybe you could fix this? I'm pretty sure the test is wrong anyway, since I was using native exceptions with the GCC runtime that shipped with 4.2.1 (the last GPLv2 version), which is <4.3, before I started working on libobjc2... git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@32043 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7bf89fa20d
commit
edc5a311d7
2 changed files with 1620 additions and 2315 deletions
14
configure.ac
14
configure.ac
|
@ -1431,14 +1431,22 @@ if test x"$USE_OBJC_EXCEPTIONS" = x"maybe"; then
|
|||
LIBS="$LIBS -shared-libgcc -fexceptions"
|
||||
AC_RUN_IFELSE([[
|
||||
#include <stdlib.h>
|
||||
#include <objc/Object.h>
|
||||
@interface Test { id isa; } @end
|
||||
@implementation Test
|
||||
+ (id)new
|
||||
{
|
||||
Test *obj = malloc(sizeof(id));
|
||||
obj->isa = self;
|
||||
return obj;
|
||||
}
|
||||
@end
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Object *o=nil;
|
||||
Test *o = 0;
|
||||
@try
|
||||
{
|
||||
o=[Object new];
|
||||
o=[Test new];
|
||||
@throw o;
|
||||
}
|
||||
@catch (id foo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue