2 @section @file{stdnoreturn.h}
4 POSIX specification:@* Not in POSIX yet, but we expect it will be.
5 ISO C11 (latest free draft
6 @url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf})
9 Gnulib module: stdnoreturn
11 Portability problems fixed by Gnulib:
14 This header file is missing on many platforms:
15 FreeBSD 6.4, NetBSD 7.1, OpenBSD 6.7, Minix 3.3.0, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9.0, mingw, MSVC 14, Android 9.0.
17 This file conflicts with some system header files, such as @code{<stdlib.h>} and
18 @code{<process.h>}, on some platforms:
22 Portability problems not fixed by Gnulib:
25 @code{<stdnoreturn.h>} should be #included before @samp{_Noreturn} is used.
27 You cannot assume that @code{_Noreturn} is a reserved word;
30 When the macro @code{lint} is defined, standard headers define
31 @code{_Noreturn} (and therefore @code{noreturn}) to be a macro that
32 expands to the empty token sequence on some platforms:
33 Cygwin 2.5.1, FreeBSD 10.3.
35 On Cygwin 1.7.30 and MSVC 14, @code{noreturn} expands to the empty token
36 sequence, to avoid problems with standard headers that use @code{noreturn}
37 in combination with @code{__attribute__} or @code{__declspec}. Although
38 the resulting code operates correctly, the compiler is not informed whether
39 @code{noreturn} functions do not return, so it may generate incorrect
40 warnings at compile-time, or code that is slightly less optimized. This
41 problem does not occur with @code{_Noreturn}.
43 Circa 2012 bleeding-edge GCC with @code{-Werror=old-style-declaration}
44 requires @code{_Noreturn} or @code{noreturn} before the returned type
45 in a declaration, and therefore rejects valid but unusually-worded
46 declarations such as @code{void _Noreturn foo (void);}.