[exception] exception_ptr for GCC

Hi, My quest for a general exception_ptr for GCC has reached its end, in the sense of, "I can't make it any better without modifying GCC." My current code is extremely fragile regarding code generation (it depends on the layout of the functions in the file) and there is one circumstance under which it leaks the exception object, but in general it works quite well. The header file, source file, and a file containing test cases are attached. Even though this can obviously not be used in production code, it's an interesting study of absurd things you can do in order to get around the limitations of a fixed ABI. Sebastian

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 01 May 2008 14:23 pm, Sebastian Redl wrote:
Hi,
My quest for a general exception_ptr for GCC has reached its end, in the sense of, "I can't make it any better without modifying GCC."
Which begs the question, are you going to modify GCC? "Copying and rethrowing exceptions" is on their todo list for their c++0x support: http://gcc.gnu.org/projects/cxx0x.html By the way, your implementation segfaults for me at the end of the program when using a global exception_ptr, test program attached. - -- Frank -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIGhW55vihyNWuA4URAjaPAJ957TZHT7T7FVsRYV44PlOqKjuUTgCg3hUo RzE4wYUelWL/e5UxE8munxw= =uTJS -----END PGP SIGNATURE-----

Frank Mori Hess wrote:
On Thursday 01 May 2008 14:23 pm, Sebastian Redl wrote:
Hi,
My quest for a general exception_ptr for GCC has reached its end, in the sense of, "I can't make it any better without modifying GCC."
Which begs the question, are you going to modify GCC? "Copying and rethrowing exceptions" is on their todo list for their c++0x support:
http://gcc.gnu.org/projects/cxx0x.html Perhaps. GCC scares me. By the way, your implementation segfaults for me at the end of the program when using a global exception_ptr, test program attached. Thanks. I'll see if I can come up with a fix.
Sebastian
participants (2)
-
Frank Mori Hess
-
Sebastian Redl