DragonFly BSD
DragonFly kernel List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

C++ exception implementation (tangent)


From: David Cuthbert <dacut@xxxxxxxxx>
Date: Thu, 03 Feb 2005 21:32:29 -0500

Greg 'groggy' Lehey wrote:
You'll notice that [C++ exceptions are] implemented with setjmp()/longjmp().

Is this the current state of g++?


I thought -- perhaps incorrectly -- that EDG-based compilers used lookup tables based on the PC. This imposes no performance hit in the cases where the exception isn't invoked -- it's popular for this reason. I thought that g++ was heading in this direction, but I haven't been following the changes terribly closely.

Win32 compilers modify a global pointer used by the OS for structured exception handling (their equivalent of signal handlers). I find it rather elegant, but no compilers take full advantage of it.



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