glibc/assert
Joseph Myers b8cc607f3c Do not define static_assert or thread_local in headers for C2x
C2x makes static_assert and thread_local into keywords, removing the
definitions as macros in assert.h and threads.h.  Thus, disable those
macros in those glibc headers for C2x.

The disabling is done based on a combination of language version and
__GNUC_PREREQ, *not* based on __GLIBC_USE (ISOC2X), on the principle
that users of the header (when requesting C11 or later APIs - not
assert.h for C99 and older API versions) should always have the names
static_assert or thread_local available after inclusion of the header,
whether as a keyword or as a macro.  Thus, when using a compiler
without the keywords (whether an older compiler, possibly in C2x mode,
or _GNU_SOURCE with any compiler but in an older language mode, for
example) the macros should be defined, even when C2x APIs have been
requested.  The __GNUC_PREREQ conditionals here may well need updating
with the versions of other compilers that gained support for these
keywords in C2x mode.

Tested for x86_64.
2022-09-07 18:39:28 +00:00
..
__assert.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
__libc_assert_fail.c assert: Do not use stderr in libc-internal assert 2022-08-03 11:43:04 +02:00
assert-perr.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
assert.c assert: Do not use stderr in libc-internal assert 2022-08-03 11:43:04 +02:00
assert.h Do not define static_assert or thread_local in headers for C2x 2022-09-07 18:39:28 +00:00
Depend
Makefile assert: Do not use stderr in libc-internal assert 2022-08-03 11:43:04 +02:00
test-assert-perr.c
test-assert.c
tst-assert-c++.cc Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-assert-g++.cc Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
Versions