diff options
| author | Collin Funk <collin.funk1@gmail.com> | 2025-04-04 20:48:25 -0700 |
|---|---|---|
| committer | Joseph Myers <josmyers@redhat.com> | 2025-04-10 18:39:05 +0000 |
| commit | d18213c6997a058a68bc2547dcb43cf77bc4504f (patch) | |
| tree | 5e00dae13794fe7cb1c67c8f9f5cb8c8d1bfd8e6 | |
| parent | e53eb952b970ac94c97d74fb447418fb327ca096 (diff) | |
| download | glibc-d18213c6997a058a68bc2547dcb43cf77bc4504f.tar.xz glibc-d18213c6997a058a68bc2547dcb43cf77bc4504f.zip | |
conform: Add initial support for C23.
Hi Joseph,
As we discussed, this patch just makes C23 include every check that is
performed by C11.
I tested the commit by adding the ISO23 Make and Python variables to be
the same as ISO11. So the only difference was compiling with -DISO23
instead of -DISO11. And changed the temporary directories to instead
use the format f'/tmp/glibc-{self.standard}-{self.header}'. Then I used
a shell script to run 'cmp' on each file in the ISO11 and ISO23
directories for each header to make sure they were the same.
-- 8< --
Make C23 checks include every test that is performed by C11. Done by
running the following command:
find conform -name '*.h-data' | xargs sed -i \
-e 's| !defined ISO11| !defined ISO11 \&\& !defined ISO23|g' \
-e 's| defined ISO11| defined ISO11 \|\| defined ISO23|g' \
-e 's|ifdef ISO11|if defined ISO11 \|\| defined ISO23|g' \
-e 's|ifndef ISO11|if !defined ISO11 \&\& !defined ISO23|g'
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
82 files changed, 151 insertions, 151 deletions
diff --git a/conform/data/aio.h-data b/conform/data/aio.h-data index adb291b6e1..7801faa0c6 100644 --- a/conform/data/aio.h-data +++ b/conform/data/aio.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined XPG42 type {struct aiocb} // Test elements of the AIO control struct. diff --git a/conform/data/arpa/inet.h-data b/conform/data/arpa/inet.h-data index 040b8212c7..c514690141 100644 --- a/conform/data/arpa/inet.h-data +++ b/conform/data/arpa/inet.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined XPG4 // in_port_t should have exactly 16 bits type in_port_t // in_addr_t should have exactly 32 bits diff --git a/conform/data/assert.h-data b/conform/data/assert.h-data index acdfef99e1..2344ee3237 100644 --- a/conform/data/assert.h-data +++ b/conform/data/assert.h-data @@ -1,9 +1,9 @@ macro assert -#ifdef ISO11 +#if defined ISO11 || defined ISO23 macro static_assert #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif diff --git a/conform/data/complex.h-data b/conform/data/complex.h-data index 4af7757bd7..0c267e47a3 100644 --- a/conform/data/complex.h-data +++ b/conform/data/complex.h-data @@ -74,7 +74,7 @@ function {long double complex} csqrtl (long double complex) function {long double complex} ctanhl (long double complex) function {long double complex} ctanl (long double complex) -# if defined ISO11 +# if defined ISO11 || defined ISO23 macro-function {double complex} CMPLX (double, double) macro-function {float complex} CMPLXF (float, float) macro-function {long double complex} CMPLXL (long double, long double) diff --git a/conform/data/cpio.h-data b/conform/data/cpio.h-data index ac7d40fd5e..ab91f2c07f 100644 --- a/conform/data/cpio.h-data +++ b/conform/data/cpio.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX constant C_IRUSR == 0000400 constant C_IWUSR == 0000200 constant C_IXUSR == 0000100 diff --git a/conform/data/ctype.h-data b/conform/data/ctype.h-data index 7e10794e46..84426f99fa 100644 --- a/conform/data/ctype.h-data +++ b/con |
