gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-make native exceptions test


From: David Chisnall
Subject: -make native exceptions test
Date: Thu, 24 Feb 2011 11:54:06 +0000

I'm trying to figure out the native exceptions test in -make, since it's wrong 
and needs fixing before the next release, but I'm hesitant to touch it because 
I can't work out what it's actually trying to do.  The correct behaviour should 
be:

- Test whether the exception syntax works
- Test whether we have an uncaught exception handler
- Enable native exceptions if both are true, or native exception support was 
explicitly disabled by the user (in which case we can skip the tests).

What it seems to do:

- Check we're using GCC, disable exceptions if we aren't (no idea why this test 
is here)
- Check whether the exception syntax works
- Check whether the compiler (not runtime) version is 4.4 or greater, and 
assume that this means that the uncaught exception handler won't work.

This breaks if:

- You are using the NeXT runtime (supports native exceptions, but the runtime 
isn't checked, only the compiler)
- You are using the GNUstep runtime (supports native exceptions)
- You are using a recent GCC runtime with an old compiler
- You are using clang (detected as GCC 4.2), but with a recent(ish) runtime

Basically, this complex test only actually works if you are using gcc 4.4 or 
later, and so could be replaced by a much simpler (though equally wrong) test 
for gcc 4.4 or later.

The thing that is confusing me, is that we have a test in -base for an uncaught 
exception handler, which tests the thing that we actually want to test (i.e. 
can we handle uncaught exceptions), rather than something vaguely related (are 
we using GCC 4.4 or later).  Why are we not using this in -make?

David

-- Sent from my STANTEC-ZEBRA


reply via email to

[Prev in Thread] Current Thread [Next in Thread]