On Sun, 4 Jan 2015, David M. Warme wrote:
I agree completely. While I do not mind compiling GMP as C++ code, I vigorously reject the recent suggestion of migrating GMP toward a "C++ only" code base. There is too much C code out there that uses GMP, mine included. Although it is relatively simple for C++ to call a C library, the reverse is indescribably ugly, difficult and non-portable.
If you compile GMP using a C++ compiler today, you get a library that has the same ABI as with a C compiler, a user cannot see the difference. If we replaced some aborts with throws, for C users, it would only change the error message printed when abort occurs. (I am not advocating C++-only, just replying to the point above)
Option (3): compile GMP as C++. But it might also be an interesting exercise to see if these mechanisms can be used to translate "raw C" GMP exceptions into corresponding C++ exceptions. This is probably already done for certain OS signals (SIGFPE, etc.).
I only know of windows where signals are implemented as exceptions. -- Marc Glisse _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel