Problems with exit prototype including throw()
Jakub Jelinek
jakub@redhat.com
Wed Oct 11 02:09:00 GMT 2000
Hi!
Several things break because glibc 2.2 declares exit with throw() while it
did not do that previously.
The issue is that if you include stdlib.h (even indirectly) and declare yourself
void exit(int);
C++ errors on it.
I'm not sure if the right way is to fix all those crapy programs or if it
would not be easier to just kill the __THROW on exit. It is declared
noreturn, so in my understanding a noreturn function should not throw
exceptions either, because then it would actually return, I haven't seen any
differences in g++ output but there of course could be some...
One thing which would be hard to fix is autoconf, which declares exit itself
(of course without throw(), so when some configure.in sets current language
to c++ and a test includes stdlib.h, it will die).
Ideas?
Jakub
More information about the Libc-hacker
mailing list