svn commit: r228322 - in head: include lib/libc/stdlib sys/sys

2011-12-07 Thread David Chisnall
Author: theraven Date: Wed Dec 7 15:25:48 2011 New Revision: 228322 URL: http://svn.freebsd.org/changeset/base/228322 Log: Implement quick_exit() / at_quick_exit() from C++11 / C1x. Also add a __noreturn macro and modify the other exiting functions to use it. The __noreturn macro,

Re: svn commit: r228322 - in head: include lib/libc/stdlib sys/sys

2011-12-07 Thread Kostik Belousov
On Wed, Dec 07, 2011 at 03:25:48PM +, David Chisnall wrote: Author: theraven Date: Wed Dec 7 15:25:48 2011 New Revision: 228322 URL: http://svn.freebsd.org/changeset/base/228322 Log: Implement quick_exit() / at_quick_exit() from C++11 / C1x. Also add a __noreturn macro and

Re: svn commit: r228322 - in head: include lib/libc/stdlib sys/sys

2011-12-07 Thread Stefan Farfeleder
On Wed, Dec 07, 2011 at 03:25:48PM +, David Chisnall wrote: /* + * If we're in a mode greater than C99, expose C1x functions. + */ +#if __ISO_C_VISIBLE 1999 +__noreturn void quick_exit(int) +int +at_quick_exit(void (*func)(void)); +#endif /* __ISO_C_VISIBLE 1999 */ +/* *

Re: svn commit: r228322 - in head: include lib/libc/stdlib sys/sys

2011-12-07 Thread Bruce Evans
On Wed, 7 Dec 2011, Kostik Belousov wrote: On Wed, Dec 07, 2011 at 03:25:48PM +, David Chisnall wrote: Log: Implement quick_exit() / at_quick_exit() from C++11 / C1x. Also add a __noreturn macro and modify the other exiting functions to use it. ... +struct quick_exit_handler { +

Re: svn commit: r228322 - in head: include lib/libc/stdlib sys/sys

2011-12-07 Thread David Schultz
On Wed, Dec 07, 2011, David Chisnall wrote: Author: theraven Date: Wed Dec 7 15:25:48 2011 New Revision: 228322 URL: http://svn.freebsd.org/changeset/base/228322 Log: Implement quick_exit() / at_quick_exit() from C++11 / C1x. Also add a __noreturn macro and modify the other exiting

Re: svn commit: r228322 - in head: include lib/libc/stdlib sys/sys

2011-12-07 Thread David Chisnall
On 7 Dec 2011, at 19:11, David Schultz wrote: Why not use the standard spelling, '_Noreturn'? In pre-C1X modes, _Noreturn is a reserved identifier since it starts with an underscore and capital letter, so it's not considered namespace pollution. Because that would be too obvious... David

Re: svn commit: r228322 - in head: include lib/libc/stdlib sys/sys

2011-12-07 Thread Bruce Evans
On Wed, 7 Dec 2011, David Schultz wrote: On Wed, Dec 07, 2011, David Chisnall wrote: Log: Implement quick_exit() / at_quick_exit() from C++11 / C1x. Also add a __noreturn macro and modify the other exiting functions to use it. The __noreturn macro, unlike __dead2, must be used BEFORE