summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-03-16 13:45:40 +0100
committerBruno Haible <bruno@clisp.org>2023-03-16 13:45:40 +0100
commitd7630af4363afdbda443c63400473dc135bc858f (patch)
tree010ed5960786ba276ca7e125222f8a21179bd386 /doc
parent90356fd2227dd19317d50b9cf40168ccb15e585c (diff)
downloadgnulib-d7630af4363afdbda443c63400473dc135bc858f.tar.gz
stddef: Define 'unreachable', for ISO C 23 compliance.
* lib/verify.h (_GL_HAS_BUILTIN_UNREACHABLE): Don't define if already defined. * lib/stddef.in.h (_GL_HAS_BUILTIN_UNREACHABLE, unreachable): New macros. (abort): Declare if needed for unreachable. * m4/stddef_h.m4 (gl_STDDEF_H): Test for unreachable. * tests/test-stddef.c (test_unreachable_optimization, test_unreachable_noreturn): New functions, based on tests/test-verify.c. * doc/posix-headers/stddef.texi: Mention unreachable.
Diffstat (limited to 'doc')
-rw-r--r--doc/posix-headers/stddef.texi4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/posix-headers/stddef.texi b/doc/posix-headers/stddef.texi
index e240f93363..33ad48244c 100644
--- a/doc/posix-headers/stddef.texi
+++ b/doc/posix-headers/stddef.texi
@@ -8,6 +8,10 @@ Gnulib module: stddef
Portability problems fixed by Gnulib:
@itemize
@item
+Some platforms fail to provide @code{unreachable}, which was added in C23:
+GCC 13, clang 15, AIX with xlc 12.1, Solaris with Sun C 5.15, and others.
+
+@item
Some platforms fail to provide @code{max_align_t}, which was added in C11:
NetBSD 8.0, Solaris 11.0, and others.