From patchwork Thu Apr 3 07:17:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Collin Funk X-Patchwork-Id: 109787 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5BB62384A894 for ; Thu, 3 Apr 2025 07:18:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5BB62384A894 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=iWY9eK3S X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 3CCF83865C29 for ; Thu, 3 Apr 2025 07:17:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3CCF83865C29 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3CCF83865C29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743664667; cv=none; b=PkVuieLJQHxSQZARND13WXxNYNX53yfHyMgBa5QkChx1F7KIPYGhKRY72ueyH93p4wolzELMOXY0VqVB9mn4+HEi0gCgYlYMBdQ35PxHfSRswWRAqYi/ConiXWF6T/y4i6Zepw06+sK3yf5WfrTZl9ns87A/ewOoMUaZ1UobIRw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743664667; c=relaxed/simple; bh=n7kJCFaUimRQBEHuKO9YfZwhVeVg5xJf6RwJzJl20j8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=XSRbsyLomWWhM+TgffbSPu9poikqHVS6D+Z53rFz8LDhQJHY8Z6+Xx5rp+AiF7G9xyGKPqhfibZawy/0Gp4Qzln7iRiP41Y3/4moBxrqO2CDp+zJ72E9KeueM75N4F/Eiu0kj6TFvdQJhUPS6Rz/fEKTrqLrH7UEO6u3c84pF7U= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3CCF83865C29 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7359aca7ef2so692711b3a.2 for ; Thu, 03 Apr 2025 00:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743664666; x=1744269466; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+CWU7737pBvSJdvaFw9goXtpxhPNhYWjwkdkibfYZSc=; b=iWY9eK3S3r7LOC033kQsUf1D35jU6ys6s7R0DR4ACP2YOfNNXjHvkXNVto7+Gipf2x +jhvFRl00/4lCNkvwmqDQZ5Sc82U11TUSM9wMb7sb1LybjCxB9fvcCdupujhd11fmSdf 1t0wbZAQb3EdSwkCLAAF1YbObpFFxm0/kSy0TgV4dKwDwfWnLMq7orbIa6/LGibn8kdi vv652K6NrQ92T2IMAYqMRYgr5hI78uBHdChsHnHQzEVI9KgIPfonSkELHr7XNWgHuY/H G9AT+xNWuFLF9rEJgHkfV8ZGg/rtgdYfo05EPCeuWkLO4Q2NFwZ2j1dbd3uy1TraSttl t/zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743664666; x=1744269466; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+CWU7737pBvSJdvaFw9goXtpxhPNhYWjwkdkibfYZSc=; b=hhPr0iEyyLhylfWHhQWwKuryu//As/2/IDOwxa0QSYWmuncoQdrzitFo/U06hx1mcf m/POF7NgUFa4WFc+QULUZGVLyET6piQ1UkYKuXQ/qGykIQhBSL4SNlvE49umFJfasrro 8Mmcu6k9+Kmpejdqo42lfbHxAzePymaQQXYAEga6CXsYZ+ScqLLZX6tF8RehmQmFUuuW UpT/xW5apwlrhQeJFaDw2vsej9boqFDj6cnDxINwwD4RYoA8j5HlXtHFJpylIsAeMz0v fgtq8wU+DXikOVHTyKcxhPnCE45OF8A6qUI9aLd8bEdNJBmsmPm9Sq+mf4YLlGomFEo1 DiVw== X-Gm-Message-State: AOJu0YwAU4F4tilTUB6I6YXxruE7o1RAVhS6wENevq0rUwXlagvHdslQ +9IIEIUgDO+cJ9Z4LoX4VFhHCSxygeRXagPzhFiFqtWtpgbpy9acweGwRg== X-Gm-Gg: ASbGncuKbjE+q+3+nsmF4HZLuD26UTphq7bLfBa/bSdL2a+gf70uHDBQn/Y2krq6iqJ pjCNTNHks2JHkMG3ug71GSi8JtZWTBCu0VGNVhHxNZNqkoagr23vhk3nln3+zByXRnj+c4aDUdA nWLnYuITxvSeSRJWkQ/RIwogT7Zq1u2qygKdkVVj2LzTAOdNNndl8ACPLKYie0cA0XLDvp05IGk YCBL11SpPvZlvbQIzlR6B9XjNQedUAUiXC3Az/hbKMaoJJaMCod0xVVrywkVbJ6CMuIUltLGkvp trr3gZA6J+0uTbYiMjrhcP3mqJu/phpTfCtxFXlEpy3JSivPa833KSrNSpFg74Aklt+2vO00Qay o X-Google-Smtp-Source: AGHT+IFK7Gyxw/EHVwQuchYUEKnk1eTFjez4piqutSICQNppGbbFBFV+OR/h/rbMSZhNJbbYaKocXA== X-Received: by 2002:a05:6a00:848:b0:736:5b85:a911 with SMTP id d2e1a72fcca58-73980399504mr30305629b3a.8.1743664664539; Thu, 03 Apr 2025 00:17:44 -0700 (PDT) Received: from fedora.. (c-73-93-224-2.hsd1.ca.comcast.net. [73.93.224.2]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-739d97d1c7esm754763b3a.36.2025.04.03.00.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Apr 2025 00:17:44 -0700 (PDT) From: Collin Funk To: libc-alpha@sourceware.org Cc: Collin Funk Subject: [PATCH] conform: Add initial tests for C23. Date: Thu, 3 Apr 2025 00:17:24 -0700 Message-ID: <20250403071737.2753661-1-collin.funk1@gmail.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org The following patch adds initial support for C23. It passes with current glibc and will need adjustment as more of C23 is implemented. * conform/data/stdbit.h-data: New file. * conform/data/stdckdint.h-data: New file. * conform/data/*.h-data: Update to match C23. * conform/Makefile (conformtest-standards): Add ISO23. (conformtest-headers-ISO23): New variable. (linknamespace-libs-ISO23): New variable. * conform/glibcconform.py (CFLAGS): Use add 'ISOC23' using -std=c2x which is supported by all versions of GCC that glibc supports. * conform/list-header-symbols.py (EXTRA_SYMS): Add 'ISO23'. Signed-off-by: Collin Funk --- conform/Makefile | 13 +++ conform/data/aio.h-data | 2 +- conform/data/arpa/inet.h-data | 2 +- conform/data/assert.h-data | 2 +- conform/data/complex.h-data | 2 +- conform/data/cpio.h-data | 2 +- conform/data/ctype.h-data | 4 +- conform/data/dirent.h-data | 2 +- conform/data/dlfcn.h-data | 2 +- conform/data/errno.h-data | 2 +- conform/data/fcntl.h-data | 2 +- conform/data/fenv.h-data | 17 +++- conform/data/float.h-data | 60 ++++++++++++- conform/data/fmtmsg.h-data | 2 +- conform/data/fnmatch.h-data | 2 +- conform/data/ftw.h-data | 2 +- conform/data/glob.h-data | 2 +- conform/data/grp.h-data | 2 +- conform/data/iconv.h-data | 2 +- conform/data/inttypes.h-data | 98 +++++++++++++++++++++ conform/data/iso646.h-data | 2 +- conform/data/langinfo.h-data | 2 +- conform/data/libgen.h-data | 2 +- conform/data/limits.h-data | 44 +++++++++- conform/data/locale.h-data | 4 +- conform/data/math.h-data | 146 +++++++++++++++++++++++++++++-- conform/data/monetary.h-data | 2 +- conform/data/mqueue.h-data | 2 +- conform/data/ndbm.h-data | 2 +- conform/data/net/if.h-data | 2 +- conform/data/netdb.h-data | 2 +- conform/data/netinet/in.h-data | 2 +- conform/data/nl_types.h-data | 2 +- conform/data/poll.h-data | 2 +- conform/data/pthread.h-data | 2 +- conform/data/pwd.h-data | 2 +- conform/data/regex.h-data | 2 +- conform/data/sched.h-data | 2 +- conform/data/search.h-data | 2 +- conform/data/semaphore.h-data | 2 +- conform/data/setjmp.h-data | 8 +- conform/data/signal.h-data | 8 +- conform/data/spawn.h-data | 2 +- conform/data/stdalign.h-data | 2 +- conform/data/stdarg.h-data | 4 +- conform/data/stdbit.h-data | 112 ++++++++++++++++++++++++ conform/data/stdbool.h-data | 6 +- conform/data/stdckdint.h-data | 7 ++ conform/data/stddef.h-data | 9 +- conform/data/stdint.h-data | 99 +++++++++++++++++++++ conform/data/stdio.h-data | 20 ++--- conform/data/stdlib.h-data | 60 ++++++------- conform/data/stdnoreturn.h-data | 2 +- conform/data/string.h-data | 8 +- conform/data/strings.h-data | 2 +- conform/data/sys/ipc.h-data | 2 +- conform/data/sys/mman.h-data | 2 +- conform/data/sys/msg.h-data | 2 +- conform/data/sys/resource.h-data | 2 +- conform/data/sys/select.h-data | 2 +- conform/data/sys/sem.h-data | 2 +- conform/data/sys/shm.h-data | 2 +- conform/data/sys/socket.h-data | 2 +- conform/data/sys/stat.h-data | 2 +- conform/data/sys/statvfs.h-data | 2 +- conform/data/sys/time.h-data | 2 +- conform/data/sys/timeb.h-data | 2 +- conform/data/sys/times.h-data | 2 +- conform/data/sys/types.h-data | 2 +- conform/data/sys/uio.h-data | 2 +- conform/data/sys/un.h-data | 2 +- conform/data/sys/utsname.h-data | 2 +- conform/data/sys/wait.h-data | 2 +- conform/data/syslog.h-data | 2 +- conform/data/tar.h-data | 2 +- conform/data/termios.h-data | 2 +- conform/data/tgmath.h-data | 11 +++ conform/data/threads.h-data | 4 +- conform/data/time.h-data | 13 ++- conform/data/uchar.h-data | 9 +- conform/data/ucontext.h-data | 2 +- conform/data/ulimit.h-data | 2 +- conform/data/unistd.h-data | 2 +- conform/data/utime.h-data | 2 +- conform/data/utmpx.h-data | 2 +- conform/data/wchar.h-data | 18 ++-- conform/data/wctype.h-data | 4 +- conform/data/wordexp.h-data | 2 +- conform/glibcconform.py | 12 +++ conform/list-header-symbols.py | 1 + 90 files changed, 774 insertions(+), 151 deletions(-) create mode 100644 conform/data/stdbit.h-data create mode 100644 conform/data/stdckdint.h-data diff --git a/conform/Makefile b/conform/Makefile index c425f8d929..cc023aabc9 100644 --- a/conform/Makefile +++ b/conform/Makefile @@ -29,6 +29,7 @@ conformtest-standards := \ ISO \ ISO11 \ ISO99 \ + ISO23 \ POSIX \ POSIX2008 \ UNIX98 \ @@ -74,6 +75,17 @@ conformtest-headers-ISO11 := \ threads.h \ uchar.h \ # conformtest-headers-ISO11 +# Missing ISO23 expectations for: +# stdatomic.h +# We cannot put stdalign.h since it defines nothing in C23. +conformtest-headers-ISO23 := \ + $(conformtest-headers-ISO99) \ + stdbit.h \ + stdckdint.h \ + stdnoreturn.h \ + threads.h \ + uchar.h \ + # conformtest-headers-ISO23 conformtest-headers-POSIX := \ $(conformtest-headers-ISO) \ aio.h \ @@ -414,6 +426,7 @@ linknamespace-libs-ISO = $(linknamespace-libs-isoc) linknamespace-libs-ISO99 = $(linknamespace-libs-isoc) linknamespace-libs-ISO11 = $(linknamespace-libs-isoc) \ $(filter-out %_syms.a,$(static-thread-library)) +linknamespace-libs-ISO23 = $(linknamespace-libs-ISO11) linknamespace-libs-XPG4 = $(linknamespace-libs-isoc) linknamespace-libs-XPG42 = $(linknamespace-libs-XPG4) linknamespace-libs-POSIX = $(linknamespace-libs-thr) 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..1a0a213927 100644 --- a/conform/data/assert.h-data +++ b/conform/data/assert.h-data @@ -4,6 +4,6 @@ macro assert 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/conform/data/ctype.h-data @@ -16,7 +16,7 @@ function int toupper (int) function int isblank (int) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function int isascii (int) function int toascii (int) @@ -46,6 +46,6 @@ function int toupper_l (int, locale_t) allow is[abcdefghijklmnopqrstuvwxyz]* allow to[abcdefghijklmnopqrstuvwxyz]* -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif diff --git a/conform/data/dirent.h-data b/conform/data/dirent.h-data index be7ad06fd8..e7acdebc7b 100644 --- a/conform/data/dirent.h-data +++ b/conform/data/dirent.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 type DIR type {struct dirent} diff --git a/conform/data/dlfcn.h-data b/conform/data/dlfcn.h-data index b6658ae8ca..e85288933c 100644 --- a/conform/data/dlfcn.h-data +++ b/conform/data/dlfcn.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined XPG4 && !defined XPG42 macro RTLD_LAZY macro RTLD_NOW macro RTLD_GLOBAL diff --git a/conform/data/errno.h-data b/conform/data/errno.h-data index 12730ba974..c7b5f7fdba 100644 --- a/conform/data/errno.h-data +++ b/conform/data/errno.h-data @@ -7,7 +7,7 @@ macro-int-constant ERANGE {int} > 0 // variable int errno allow errno -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 macro-int-constant E2BIG {int} > 0 macro-int-constant EACCES {int} > 0 # if !defined POSIX diff --git a/conform/data/fcntl.h-data b/conform/data/fcntl.h-data index ffa4a351fb..8491ca671d 100644 --- a/conform/data/fcntl.h-data +++ b/conform/data/fcntl.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 constant F_DUPFD constant F_GETFD constant F_SETFD diff --git a/conform/data/fenv.h-data b/conform/data/fenv.h-data index 280b72864c..182efea6de 100644 --- a/conform/data/fenv.h-data +++ b/conform/data/fenv.h-data @@ -1,6 +1,9 @@ #if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 type fenv_t type fexcept_t +#if defined ISO23 +type femode_t +#endif optional-macro-int-constant FE_DIVBYZERO optional-macro-int-constant FE_INEXACT @@ -21,16 +24,28 @@ macro FE_DFL_ENV {const fenv_t *} function int feclearexcept (int) function int fegetexceptflag (fexcept_t*, int) function int feraiseexcept (int) +#if defined ISO23 +function int fesetexcept (int) +#endif function int fesetexceptflag (const fexcept_t*, int) +#if defined ISO23 +function int fetestexceptflag (const fexcept_t *, int) +#endif function int fetestexcept (int) +#if defined ISO23 +function int fegetmode (femode_t *) +#endif function int fegetround (void) +#if defined ISO23 +function int fesetmode (const femode_t *) +#endif function int fesetround (int) function int fegetenv (fenv_t*) function int feholdexcept (fenv_t*) function int fesetenv (const fenv_t*) function int feupdateenv (const fenv_t *) -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif #endif diff --git a/conform/data/float.h-data b/conform/data/float.h-data index 7b98fc0344..6815ae4d89 100644 --- a/conform/data/float.h-data +++ b/conform/data/float.h-data @@ -38,12 +38,68 @@ macro-constant FLT_MIN <= 1.0E-37 macro-constant DBL_MIN <= 1.0E-37 macro-constant LDBL_MIN <= 1.0E-37 +#if defined ISO23 + +macro-constant DEC_EVAL_METHOD + +optional-constant FLT_IS_IEC_60559 +optional-constant DBL_IS_IEC_60559 +optional-constant LDBL_IS_IEC_60559 + +constant FLT_NORM_MAX +constant DBL_NORM_MAX +constant LDBL_NORM_MAX + +optional-constant FLT_SNAN +optional-constant DBL_SNAN +optional-constant LDBL_SNAN + +optional-constant INFINITY +optional-constant NAN + +optional-constant DEC32_SNAN +optional-constant DEC64_SNAN +optional-constant DEC128_SNAN + +optional-constant DEC_INFINITY +optional-constant DEC_NAN + +optional-constant DEC32_MANT_DIG +optional-constant DEC64_MANT_DIG +optional-constant DEC128_MANT_DIG + +optional-constant DEC32_MIN_EXP +optional-constant DEC64_MIN_EXP +optional-constant DEC128_MIN_EXP + +optional-constant DEC32_MAX_EXP +optional-constant DEC64_MAX_EXP +optional-constant DEC128_MAX_EXP + +optional-constant DEC32_MAX +optional-constant DEC64_MAX +optional-constant DEC128_MAX + +optional-constant DEC32_EPSILON +optional-constant DEC64_EPSILON +optional-constant DEC128_EPSILON + +optional-constant DEC32_MIN +optional-constant DEC64_MIN +optional-constant DEC128_MIN + +optional-constant DEC32_TRUE_MIN +optional-constant DEC64_TRUE_MIN +optional-constant DEC128_TRUE_MIN + +#endif + #if !defined ISO && !defined XPG4 && !defined XPG42 && !defined POSIX && !defined UNIX98 macro-int-constant DECIMAL_DIG >= 10 macro-int-constant FLT_EVAL_METHOD #endif -#if defined ISO11 +#if defined ISO11 || defined ISO23 macro-int-constant DBL_HAS_SUBNORM macro-int-constant FLT_HAS_SUBNORM macro-int-constant LDBL_HAS_SUBNORM @@ -57,6 +113,6 @@ macro-constant FLT_TRUE_MIN <= 1E-37 macro-constant LDBL_TRUE_MIN <= 1E-37 #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/fmtmsg.h-data b/conform/data/fmtmsg.h-data index c1b18ad4a4..16d000365f 100644 --- a/conform/data/fmtmsg.h-data +++ b/conform/data/fmtmsg.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 && !defined XPG4 macro MM_HARD constant MM_HARD diff --git a/conform/data/fnmatch.h-data b/conform/data/fnmatch.h-data index 12a9a4ac2e..e63a46936d 100644 --- a/conform/data/fnmatch.h-data +++ b/conform/data/fnmatch.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 constant FNM_NOMATCH constant FNM_PATHNAME constant FNM_PERIOD diff --git a/conform/data/ftw.h-data b/conform/data/ftw.h-data index 340334bfd4..5c8568fd60 100644 --- a/conform/data/ftw.h-data +++ b/conform/data/ftw.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 # ifndef XPG4 type {struct FTW} element {struct FTW} int base diff --git a/conform/data/glob.h-data b/conform/data/glob.h-data index eca83937af..3b5a99927d 100644 --- a/conform/data/glob.h-data +++ b/conform/data/glob.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 #ifdef POSIX # define size_t __size_t #endif diff --git a/conform/data/grp.h-data b/conform/data/grp.h-data index 1688444586..428329bbea 100644 --- a/conform/data/grp.h-data +++ b/conform/data/grp.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 #ifdef POSIX # define gid_t __gid_t #endif diff --git a/conform/data/iconv.h-data b/conform/data/iconv.h-data index 79fb2d6def..8700fc61b2 100644 --- a/conform/data/iconv.h-data +++ b/conform/data/iconv.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 type iconv_t # if defined XOPEN2K8 || defined POSIX2008 type size_t diff --git a/conform/data/inttypes.h-data b/conform/data/inttypes.h-data index 2ae5b951be..7e3a383298 100644 --- a/conform/data/inttypes.h-data +++ b/conform/data/inttypes.h-data @@ -18,33 +18,54 @@ macro PRIo8 macro PRIu8 macro PRIx8 macro PRIX8 +#if defined ISO23 +macro PRIb8 +macro PRIB8 +#endif macro SCNd8 macro SCNi8 macro SCNo8 macro SCNu8 macro SCNx8 +#if defined ISO23 +macro SCNb8 +#endif macro PRIdLEAST8 macro PRIiLEAST8 macro PRIoLEAST8 macro PRIuLEAST8 macro PRIxLEAST8 macro PRIXLEAST8 +#if defined ISO23 +macro PRIbLEAST8 +macro PRIBLEAST8 +#endif macro SCNdLEAST8 macro SCNiLEAST8 macro SCNoLEAST8 macro SCNuLEAST8 macro SCNxLEAST8 +#if defined ISO23 +macro SCNbLEAST8 +#endif macro PRIdFAST8 macro PRIiFAST8 macro PRIoFAST8 macro PRIuFAST8 macro PRIxFAST8 macro PRIXFAST8 +#if defined ISO23 +macro PRIbFAST8 +macro PRIBFAST8 +#endif macro SCNdFAST8 macro SCNiFAST8 macro SCNoFAST8 macro SCNuFAST8 macro SCNxFAST8 +#if defined ISO23 +macro SCNbFAST8 +#endif macro PRId16 macro PRIi16 @@ -52,33 +73,54 @@ macro PRIo16 macro PRIu16 macro PRIx16 macro PRIX16 +#if defined ISO23 +macro PRIb16 +macro PRIB16 +#endif macro SCNd16 macro SCNi16 macro SCNo16 macro SCNu16 macro SCNx16 +#if defined ISO23 +macro SCNb16 +#endif macro PRIdLEAST16 macro PRIiLEAST16 macro PRIoLEAST16 macro PRIuLEAST16 macro PRIxLEAST16 macro PRIXLEAST16 +#if defined ISO23 +macro PRIbLEAST16 +macro PRIBLEAST16 +#endif macro SCNdLEAST16 macro SCNiLEAST16 macro SCNoLEAST16 macro SCNuLEAST16 macro SCNxLEAST16 +#if defined ISO23 +macro SCNbLEAST16 +#endif macro PRIdFAST16 macro PRIiFAST16 macro PRIoFAST16 macro PRIuFAST16 macro PRIxFAST16 macro PRIXFAST16 +#if defined ISO23 +macro PRIbFAST16 +macro PRIBFAST16 +#endif macro SCNdFAST16 macro SCNiFAST16 macro SCNoFAST16 macro SCNuFAST16 macro SCNxFAST16 +#if defined ISO23 +macro SCNbFAST16 +#endif macro PRId32 macro PRIi32 @@ -86,33 +128,54 @@ macro PRIo32 macro PRIu32 macro PRIx32 macro PRIX32 +#if defined ISO23 +macro PRIb32 +macro PRIB32 +#endif macro SCNd32 macro SCNi32 macro SCNo32 macro SCNu32 macro SCNx32 +#if defined ISO23 +macro SCNb32 +#endif macro PRIdLEAST32 macro PRIiLEAST32 macro PRIoLEAST32 macro PRIuLEAST32 macro PRIxLEAST32 macro PRIXLEAST32 +#if defined ISO23 +macro PRIbLEAST32 +macro PRIBLEAST32 +#endif macro SCNdLEAST32 macro SCNiLEAST32 macro SCNoLEAST32 macro SCNuLEAST32 macro SCNxLEAST32 +#if defined ISO23 +macro SCNbLEAST32 +#endif macro PRIdFAST32 macro PRIiFAST32 macro PRIoFAST32 macro PRIuFAST32 macro PRIxFAST32 macro PRIXFAST32 +#if defined ISO23 +macro PRIbFAST32 +macro PRIBFAST32 +#endif macro SCNdFAST32 macro SCNiFAST32 macro SCNoFAST32 macro SCNuFAST32 macro SCNxFAST32 +#if defined ISO23 +macro SCNbFAST32 +#endif macro PRId64 macro PRIi64 @@ -120,33 +183,54 @@ macro PRIo64 macro PRIu64 macro PRIx64 macro PRIX64 +#if defined ISO23 +macro PRIb64 +macro PRIB64 +#endif macro SCNd64 macro SCNi64 macro SCNo64 macro SCNu64 macro SCNx64 +#if defined ISO23 +macro SCNb64 +#endif macro PRIdLEAST64 macro PRIiLEAST64 macro PRIoLEAST64 macro PRIuLEAST64 macro PRIxLEAST64 macro PRIXLEAST64 +#if defined ISO23 +macro PRIbLEAST64 +macro PRIBLEAST64 +#endif macro SCNdLEAST64 macro SCNiLEAST64 macro SCNoLEAST64 macro SCNuLEAST64 macro SCNxLEAST64 +#if defined ISO23 +macro SCNbLEAST64 +#endif macro PRIdFAST64 macro PRIiFAST64 macro PRIoFAST64 macro PRIuFAST64 macro PRIxFAST64 macro PRIXFAST64 +#if defined ISO23 +macro PRIbFAST64 +macro PRIBFAST64 +#endif macro SCNdFAST64 macro SCNiFAST64 macro SCNoFAST64 macro SCNuFAST64 macro SCNxFAST64 +#if defined ISO23 +macro SCNbFAST64 +#endif macro PRIdMAX macro PRIiMAX @@ -154,11 +238,18 @@ macro PRIoMAX macro PRIuMAX macro PRIxMAX macro PRIXMAX +#if defined ISO23 +macro PRIbMAX +macro PRIBMAX +#endif macro SCNdMAX macro SCNiMAX macro SCNoMAX macro SCNuMAX macro SCNxMAX +#if defined ISO23 +macro SCNbMAX +#endif macro PRIdPTR macro PRIiPTR @@ -166,11 +257,18 @@ macro PRIoPTR macro PRIuPTR macro PRIxPTR macro PRIXPTR +#if defined ISO23 +macro PRIbPTR +macro PRIBPTR +#endif macro SCNdPTR macro SCNiPTR macro SCNoPTR macro SCNuPTR macro SCNxPTR +#if defined ISO23 +macro SCNbPTR +#endif allow PRI[Xa-z]* allow SCN[Xa-z]* diff --git a/conform/data/iso646.h-data b/conform/data/iso646.h-data index 9e307f734d..713c3a4827 100644 --- a/conform/data/iso646.h-data +++ b/conform/data/iso646.h-data @@ -11,7 +11,7 @@ macro or_eq macro xor macro xor_eq -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif #endif diff --git a/conform/data/langinfo.h-data b/conform/data/langinfo.h-data index 6bbb3872a0..4bd90f2e95 100644 --- a/conform/data/langinfo.h-data +++ b/conform/data/langinfo.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 CODESET constant D_T_FMT constant D_FMT diff --git a/conform/data/libgen.h-data b/conform/data/libgen.h-data index e9eb5fafc9..aee71bb160 100644 --- a/conform/data/libgen.h-data +++ b/conform/data/libgen.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 && !defined XPG4 function {char*} basename (char*) function {char*} dirname (char*) diff --git a/conform/data/limits.h-data b/conform/data/limits.h-data index 23114a5fa0..4462d877c7 100644 --- a/conform/data/limits.h-data +++ b/conform/data/limits.h-data @@ -1,7 +1,13 @@ macro-int-constant CHAR_BIT >= 8 macro-int-constant SCHAR_MIN {promoted:signed char} <= -127 macro-int-constant SCHAR_MAX {promoted:signed char} >= 127 +#if defined ISO23 +macro-int-constant SCHAR_WIDTH >= 8 +#endif macro-int-constant UCHAR_MAX {promoted:unsigned char} >= 255 +#if defined ISO23 +macro-int-constant UCHAR_WIDTH >= 8 +#endif #ifdef __CHAR_UNSIGNED__ macro-int-constant CHAR_MIN {promoted:char} == 0 macro-int-constant CHAR_MAX {promoted:char} == UCHAR_MAX @@ -9,24 +15,58 @@ macro-int-constant CHAR_MAX {promoted:char} == UCHAR_MAX macro-int-constant CHAR_MIN {promoted:char} == SCHAR_MIN macro-int-constant CHAR_MAX {promoted:char} == SCHAR_MAX #endif +#if defined ISO23 +macro-int-constant CHAR_WIDTH >= 8 +#endif macro-int-constant MB_LEN_MAX >= 1 macro-int-constant SHRT_MIN {promoted:short int} <= -32767 macro-int-constant SHRT_MAX {promoted:short int} >= 32767 +#if defined ISO23 +macro-int-constant SHRT_WIDTH >= 16 +#endif macro-int-constant USHRT_MAX {promoted:unsigned short int} >= 65535 +#if defined ISO23 +macro-int-constant USHRT_WIDTH >= 16 +#endif // The ranges for int and unsigned int are from POSIX. macro-int-constant INT_MAX {int} >= 2147483647 macro-int-constant INT_MIN {int} <= -2147483647 +/* C23 only requires 16 bit int but POSIX requires 32. */ +#if defined ISO23 +macro-int-constant INT_WIDTH >= 32 +#endif macro-int-constant UINT_MAX {unsigned int} >= 4294967295U +#if defined ISO23 +macro-int-constant UINT_WIDTH >= 32 +#endif macro-int-constant LONG_MAX {long int} >= 2147483647L macro-int-constant LONG_MIN {long int} <= -2147483647L +#if defined ISO23 +macro-int-constant LONG_WIDTH >= 32 +#endif macro-int-constant ULONG_MAX {unsigned long int} >= 4294967295UL -#if defined ISO99 || defined ISO11 || defined XOPEN2K8 || defined POSIX2008 +#if defined ISO23 +macro-int-constant ULONG_WIDTH >= 32 +#endif +#if defined ISO99 || defined ISO11 || defined ISO23 || defined XOPEN2K8 || defined POSIX2008 macro-int-constant LLONG_MIN {long long int} <= -9223372036854775807ll macro-int-constant LLONG_MAX {long long int} >= 9223372036854775807ll +# if defined ISO23 +macro-int-constant LLONG_WIDTH >= 64 +# endif macro-int-constant ULLONG_MAX {unsigned long long int} >= 18446744073709551615ull +# if defined ISO23 +macro-int-constant ULLONG_WIDTH >= 64 +# endif +#endif + +#if defined ISO23 +macro-int-constant BOOL_MAX >= 1 +macro-int-constant BOOL_WIDTH >= 1 +macro-int-constant BITINT_MAXWIDTH >= 64 #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 // if these values exist, we should check the minimal value allow AIO_LISTIO_MAX allow AIO_MAX diff --git a/conform/data/locale.h-data b/conform/data/locale.h-data index 266264ac6d..df28e44a0d 100644 --- a/conform/data/locale.h-data +++ b/conform/data/locale.h-data @@ -31,7 +31,7 @@ macro-constant NULL == 0 macro-int-constant LC_ALL macro-int-constant LC_COLLATE macro-int-constant LC_CTYPE -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 macro-int-constant LC_MESSAGES #endif macro-int-constant LC_MONETARY @@ -62,7 +62,7 @@ function locale_t uselocale (locale_t) #endif allow LC_[ABCDEFGHIJKLMNOPQRSTUVWXYZ]* -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif #if defined XOPEN2K8 || defined POSIX2008 diff --git a/conform/data/math.h-data b/conform/data/math.h-data index 0c50755792..0e016bbd47 100644 --- a/conform/data/math.h-data +++ b/conform/data/math.h-data @@ -21,7 +21,7 @@ type double_t function int isnan (double) # endif -# if !defined ISO99 && !defined ISO11 && !defined POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX2008 constant M_E constant M_LOG2E constant M_LOG10E @@ -64,6 +64,141 @@ macro math_errhandling {int} # endif #endif +#if defined ISO23 +macro iscanonical +macro issignaling +macro issubnormal +macro iszero +function double acospi (double) +function float acospif (float) +function {long double} acospil (long double) +function double asinpi (double) +function float asinpif (float) +function {long double} asinpil (long double) +function double atanpi (double) +function float atanpif (float) +function {long double} atanpil (long double) +function double atan2pi (double, double) +function float atan2pif (float, float) +function {long double} atan2pil (long double, long double) +function double cospi (double) +function float cospif (float) +function {long double} cospil (long double) +function double sinpi (double) +function float sinpif (float) +function {long double} sinpil (long double) +function double tanpi (double) +function float tanpif (float) +function {long double} tanpil (long double) +function double exp10 (double) +function float exp10f (float) +function {long double} exp10l (long double) +function double exp10m1 (double) +function float exp10m1f (float) +function {long double} exp10m1l (long double) +function double exp2m1 (double) +function float exp2m1f (float) +function {long double} exp2m1l (long double) +function int ilogb (double) +function int ilogbf (float) +function int ilogbl (long double) +function {long int} llogb (double) +function {long int} llogbf (float) +function {long int} llogbl (long double) +function double log10p1 (double) +function float log10p1f (float) +function {long double} log10p1l (long double) +function double logp1 (double) +function float logp1f (float) +function {long double} logp1l (long double) +function double log2p1 (double) +function float log2p1f (float) +function {long double} log2p1l (long double) +function double pow (double, double) +function float powf (float, float) +function {long double} powl (long double, long double) +function double rsqrt (double) +function float rsqrtf (float) +function {long double} rsqrtl (long double) +function double powr (double, double) +function float powrf (float, float) +function {long double} powrl (long double, long double) +function int canonicalize (double *, const double *) +function int canonicalizef (float *, const float *) +function int canonicalizel (long double *, const long double *) +function double fmaximum (double, double) +function float fmaximumf (float, float) +function {long double} fmaximuml (long double, long double) +function double fminimum (double, double) +function float fminimumf (float, float) +function {long double} fminimuml (long double, long double) +function double fmaximum_mag (double, double) +function float fmaximum_magf (float, float) +function {long double} fmaximum_magl (long double, long double) +function double fminimum_mag (double, double) +function float fminimum_magf (float, float) +function {long double} fminimum_magl (long double, long double) +function double fmaximum_num (double, double) +function float fmaximum_numf (float, float) +function {long double} fmaximum_numl (long double, long double) +function double fminimum_num (double, double) +function float fminimum_numf (float, float) +function {long double} fminimum_numl (long double, long double) +function double fmaximum_mag_num (double, double) +function float fmaximum_mag_numf (float, float) +function {long double} fmaximum_mag_numl (long double, long double) +function double fminimum_mag_num (double, double) +function float fminimum_mag_numf (float, float) +function {long double} fminimum_mag_numl (long double, long double) +function float fadd (double, double) +function float faddl (long double, long double) +function double daddl (long double, long double) +function float fsub (double, double) +function float fsubl (long double, long double) +function double dsubl (long double, long double) +function float fmul (double, double) +function float fmull (long double, long double) +function double dmull (long double, long double) +function float fdiv (double, double) +function float fdivl (long double, long double) +function double ddivl (long double, long double) +function float ffma (double, double, double) +function float ffmal (long double, long double, long double) +function double dfmal (long double, long double, long double) +function float fsqrt (double) +function float fsqrtl (long double) +function double dsqrtl (long double) +function double roundeven (double) +function float roundevenf (float) +function {long double} roundevenl (long double) +function double nextafter (double, double) +function float nextafterf (float, float) +function {long double} nextafterl (long double, long double) +function double nextup (double) +function float nextupf (float) +function {long double} nextupl (long double) +function double nextdown (double) +function float nextdownf (float) +function {long double} nextdownl (long double) +/* C23 has different return types. */ +xfail-function double fromfp (double, int, unsigned int) +xfail-function float fromfpf (float, int, unsigned int) +xfail-function {long double} fromfpl (long double, int, unsigned int) +xfail-function double ufromfp (double, int, unsigned int) +xfail-function float ufromfpf (float, int, unsigned int) +xfail-function {long double} ufromfpl (long double, int, unsigned int) +xfail-function double fromfpx (double, int, unsigned int) +xfail-function float fromfpxf (float, int, unsigned int) +xfail-function {long double} fromfpxl (long double, int, unsigned int) +xfail-function double ufromfpx (double, int, unsigned int) +xfail-function float ufromfpxf (float, int, unsigned int) +xfail-function {long double} ufromfpxl (long double, int, unsigned int) +function double pown (double, long long int) +function float pownf (float, long long int) +function {long double} pownl (long double, long long int) +macro iseqsig +#endif + function double acos (double) function double asin (double) function double atan (double) @@ -104,7 +239,7 @@ function double gamma (double) #endif #if !defined ISO && !defined POSIX function double hypot (double, double) -# if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function double j0 (double) function double j1 (double) function double jn (int, double) @@ -113,7 +248,7 @@ function double lgamma (double) # if !defined XPG4 && !defined XPG42 && !defined UNIX98 function double tgamma (double) # endif -# if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function double y0 (double) function double y1 (double) function double yn (int, double) @@ -157,7 +292,7 @@ function double nan (const char*) # endif # endif -# if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 // variable signgam allow signgam # endif @@ -221,7 +356,6 @@ function float fmaxf (float, float) function float fminf (float, float) function float fmaf (float, float, float) function float nanf (const char*) - function {long double} acosl (long double) function {long double} asinl (long double) function {long double} atanl (long double) @@ -327,7 +461,7 @@ allow tanl allow tanhl #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif #if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 diff --git a/conform/data/monetary.h-data b/conform/data/monetary.h-data index 4f0cb9b681..7a87041764 100644 --- a/conform/data/monetary.h-data +++ b/conform/data/monetary.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 type size_t type ssize_t # if defined XOPEN2K8 || defined POSIX2008 diff --git a/conform/data/mqueue.h-data b/conform/data/mqueue.h-data index 42ccd8551e..6b5c15d596 100644 --- a/conform/data/mqueue.h-data +++ b/conform/data/mqueue.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 // should test for not an array type. type mqd_t diff --git a/conform/data/ndbm.h-data b/conform/data/ndbm.h-data index 2ee7a59253..1aa4423eca 100644 --- a/conform/data/ndbm.h-data +++ b/conform/data/ndbm.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 && !defined XPG4 type datum element datum {void*} dptr element datum size_t dsize diff --git a/conform/data/net/if.h-data b/conform/data/net/if.h-data index 8a4d89c067..98e1bd796a 100644 --- a/conform/data/net/if.h-data +++ b/conform/data/net/if.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 type {struct if_nameindex} element {struct if_nameindex} {unsigned int} if_index diff --git a/conform/data/netdb.h-data b/conform/data/netdb.h-data index c6d8b70a0d..a6484ac984 100644 --- a/conform/data/netdb.h-data +++ b/conform/data/netdb.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 optional-type in_port_t optional-type in_addr_t diff --git a/conform/data/netinet/in.h-data b/conform/data/netinet/in.h-data index ccc74db608..ad1d0b3e1e 100644 --- a/conform/data/netinet/in.h-data +++ b/conform/data/netinet/in.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 type in_port_t type in_addr_t diff --git a/conform/data/nl_types.h-data b/conform/data/nl_types.h-data index 67a0d7a198..90ba794b82 100644 --- a/conform/data/nl_types.h-data +++ b/conform/data/nl_types.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 type nl_catd type nl_item diff --git a/conform/data/poll.h-data b/conform/data/poll.h-data index f7ebb91715..d99c7762f4 100644 --- a/conform/data/poll.h-data +++ b/conform/data/poll.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 type {struct pollfd} element {struct pollfd} int fd element {struct pollfd} {short int} events diff --git a/conform/data/pthread.h-data b/conform/data/pthread.h-data index 6b10499458..09bf527515 100644 --- a/conform/data/pthread.h-data +++ b/conform/data/pthread.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 constant PTHREAD_CANCEL_ASYNCHRONOUS constant PTHREAD_CANCEL_ENABLE constant PTHREAD_CANCEL_DEFERRED diff --git a/conform/data/pwd.h-data b/conform/data/pwd.h-data index e86433d6a7..b2f8cbf924 100644 --- a/conform/data/pwd.h-data +++ b/conform/data/pwd.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 #ifdef POSIX # define uid_t __uid_t # define gid_t __gid_t diff --git a/conform/data/regex.h-data b/conform/data/regex.h-data index 04f9034f81..602f2093b6 100644 --- a/conform/data/regex.h-data +++ b/conform/data/regex.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 type regex_t element regex_t size_t re_nsub diff --git a/conform/data/sched.h-data b/conform/data/sched.h-data index 63e5eb2567..639f129855 100644 --- a/conform/data/sched.h-data +++ b/conform/data/sched.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 # if defined POSIX || defined UNIX98 # include "time.h-data" # else diff --git a/conform/data/search.h-data b/conform/data/search.h-data index e99f7e6c1d..240be297fc 100644 --- a/conform/data/search.h-data +++ b/conform/data/search.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 type ENTRY type {struct entry} element {struct entry} {char*} key diff --git a/conform/data/semaphore.h-data b/conform/data/semaphore.h-data index 066c2f721b..18afd1689a 100644 --- a/conform/data/semaphore.h-data +++ b/conform/data/semaphore.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 sem_t constant SEM_FAILED diff --git a/conform/data/setjmp.h-data b/conform/data/setjmp.h-data index af28ddb59a..37bd9bd7d7 100644 --- a/conform/data/setjmp.h-data +++ b/conform/data/setjmp.h-data @@ -1,10 +1,10 @@ type jmp_buf -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 type sigjmp_buf #endif function void longjmp (jmp_buf, int) -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 function void siglongjmp (sigjmp_buf, int) # if !defined POSIX && !defined POSIX2008 function void _longjmp (jmp_buf, int) @@ -12,13 +12,13 @@ function void _longjmp (jmp_buf, int) #endif macro-function int setjmp (jmp_buf) -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 macro-function int sigsetjmp (sigjmp_buf, int) # if !defined POSIX && !defined POSIX2008 macro-function int _setjmp (jmp_buf) # endif #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/signal.h-data b/conform/data/signal.h-data index 3b00b76076..4beb3d8515 100644 --- a/conform/data/signal.h-data +++ b/conform/data/signal.h-data @@ -1,15 +1,15 @@ macro-constant SIG_DFL {void(*)(int)} macro-constant SIG_ERR {void(*)(int)} -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 macro-constant SIG_HOLD {void(*)(int)} #endif macro-constant SIG_IGN {void(*)(int)} type sig_atomic_t -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 type sigset_t #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX type pid_t #elif defined POSIX # define pid_t __pid_t @@ -68,7 +68,7 @@ macro-int-constant SIGTERM {int} > 0 function void (*signal (int, void(*)(int)))(int) function int raise (int) -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 macro-int-constant SIGALRM {int} > 0 macro-int-constant SIGHUP {int} > 0 macro-int-constant SIGKILL {int} > 0 diff --git a/conform/data/spawn.h-data b/conform/data/spawn.h-data index be69922669..47b709bf52 100644 --- a/conform/data/spawn.h-data +++ b/conform/data/spawn.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 type posix_spawnattr_t type posix_spawn_file_actions_t # if defined XOPEN2K8 || defined POSIX2008 diff --git a/conform/data/stdalign.h-data b/conform/data/stdalign.h-data index edc2310e98..b30a3a8db6 100644 --- a/conform/data/stdalign.h-data +++ b/conform/data/stdalign.h-data @@ -1,4 +1,4 @@ -#if defined ISO11 +#if defined ISO11 && !defined ISO23 macro alignas macro alignof macro-int-constant __alignas_is_defined {int} == 1 diff --git a/conform/data/stdarg.h-data b/conform/data/stdarg.h-data index 53addb91fa..c753745b31 100644 --- a/conform/data/stdarg.h-data +++ b/conform/data/stdarg.h-data @@ -5,10 +5,10 @@ macro va_start macro va_arg macro va_end -#if defined ISO99 || defined ISO11 || defined XOPEN2K || defined POSIX2008 || defined XOPEN2K8 +#if defined ISO99 || defined ISO11 || defined ISO23 || defined XOPEN2K || defined POSIX2008 || defined XOPEN2K8 macro va_copy #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/stdbit.h-data b/conform/data/stdbit.h-data new file mode 100644 index 0000000000..9a6d4cc987 --- /dev/null +++ b/conform/data/stdbit.h-data @@ -0,0 +1,112 @@ +#if defined ISO23 + +type size_t +allow int8_t +allow int16_t +allow int32_t +allow int64_t +allow uint8_t +allow uint16_t +allow uint32_t +allow uint64_t +allow int_least8_t +allow int_least16_t +allow int_least32_t +allow int_least64_t +allow uint_least8_t +allow uint_least16_t +allow uint_least32_t +allow uint_least64_t + +macro-int-constant __STDC_ENDIAN_LITTLE__ +macro-int-constant __STDC_ENDIAN_BIG__ +macro-int-constant __STDC_ENDIAN_NATIVE__ + +function {unsigned int} stdc_leading_zeros_uc (unsigned char) +function {unsigned int} stdc_leading_zeros_us (unsigned short) +function {unsigned int} stdc_leading_zeros_ui (unsigned int) +function {unsigned int} stdc_leading_zeros_ul (unsigned long int) +function {unsigned int} stdc_leading_zeros_ull (unsigned long long int) +macro stdc_leading_zeros +function {unsigned int} stdc_leading_ones_uc (unsigned char) +function {unsigned int} stdc_leading_ones_us (unsigned short) +function {unsigned int} stdc_leading_ones_ui (unsigned int) +function {unsigned int} stdc_leading_ones_ul (unsigned long int) +function {unsigned int} stdc_leading_ones_ull (unsigned long long int) +macro stdc_leading_ones +function {unsigned int} stdc_trailing_zeros_uc (unsigned char) +function {unsigned int} stdc_trailing_zeros_us (unsigned short) +function {unsigned int} stdc_trailing_zeros_ui (unsigned int) +function {unsigned int} stdc_trailing_zeros_ul (unsigned long int) +function {unsigned int} stdc_trailing_zeros_ull (unsigned long long int) +macro stdc_trailing_zeros +function {unsigned int} stdc_trailing_ones_uc (unsigned char) +function {unsigned int} stdc_trailing_ones_us (unsigned short) +function {unsigned int} stdc_trailing_ones_ui (unsigned int) +function {unsigned int} stdc_trailing_ones_ul (unsigned long int) +function {unsigned int} stdc_trailing_ones_ull (unsigned long long int) +macro stdc_trailing_ones +function {unsigned int} stdc_first_leading_zero_uc (unsigned char) +function {unsigned int} stdc_first_leading_zero_us (unsigned short) +function {unsigned int} stdc_first_leading_zero_ui (unsigned int) +function {unsigned int} stdc_first_leading_zero_ul (unsigned long int) +function {unsigned int} stdc_first_leading_zero_ull (unsigned long long int) +macro stdc_first_leading_zero +function {unsigned int} stdc_first_leading_one_uc (unsigned char) +function {unsigned int} stdc_first_leading_one_us (unsigned short) +function {unsigned int} stdc_first_leading_one_ui (unsigned int) +function {unsigned int} stdc_first_leading_one_ul (unsigned long int) +function {unsigned int} stdc_first_leading_one_ull (unsigned long long int) +macro stdc_first_leading_one +function {unsigned int} stdc_first_trailing_zero_uc (unsigned char) +function {unsigned int} stdc_first_trailing_zero_us (unsigned short) +function {unsigned int} stdc_first_trailing_zero_ui (unsigned int) +function {unsigned int} stdc_first_trailing_zero_ul (unsigned long int) +function {unsigned int} stdc_first_trailing_zero_ull (unsigned long long int) +macro stdc_first_trailing_zero +function {unsigned int} stdc_first_trailing_one_uc (unsigned char) +function {unsigned int} stdc_first_trailing_one_us (unsigned short) +function {unsigned int} stdc_first_trailing_one_ui (unsigned int) +function {unsigned int} stdc_first_trailing_one_ul (unsigned long int) +function {unsigned int} stdc_first_trailing_one_ull (unsigned long long int) +macro stdc_first_trailing_one +function {unsigned int} stdc_count_zeros_uc (unsigned char) +function {unsigned int} stdc_count_zeros_us (unsigned short) +function {unsigned int} stdc_count_zeros_ui (unsigned int) +function {unsigned int} stdc_count_zeros_ul (unsigned long int) +function {unsigned int} stdc_count_zeros_ull (unsigned long long int) +macro stdc_count_zeros +function {unsigned int} stdc_count_ones_uc (unsigned char) +function {unsigned int} stdc_count_ones_us (unsigned short) +function {unsigned int} stdc_count_ones_ui (unsigned int) +function {unsigned int} stdc_count_ones_ul (unsigned long int) +function {unsigned int} stdc_count_ones_ull (unsigned long long int) +macro stdc_count_ones +function bool stdc_has_single_bit_uc (unsigned char) +function bool stdc_has_single_bit_us (unsigned short) +function bool stdc_has_single_bit_ui (unsigned int) +function bool stdc_has_single_bit_ul (unsigned long int) +function bool stdc_has_single_bit_ull (unsigned long long int) +macro stdc_has_single_bit +function {unsigned int} stdc_bit_width_uc (unsigned char) +function {unsigned int} stdc_bit_width_us (unsigned short) +function {unsigned int} stdc_bit_width_ui (unsigned int) +function {unsigned int} stdc_bit_width_ul (unsigned long int) +function {unsigned int} stdc_bit_width_ull (unsigned long long int) +macro stdc_bit_width +/* FIXME: These should be functions not macros. */ +macro stdc_bit_floor_uc +macro stdc_bit_floor_us +macro stdc_bit_floor_ui +macro stdc_bit_floor_ul +macro stdc_bit_floor_ull +macro stdc_bit_floor +/* FIXME: These should be functions not macros. */ +macro stdc_bit_ceil_uc +macro stdc_bit_ceil_us +macro stdc_bit_ceil_ui +macro stdc_bit_ceil_ul +macro stdc_bit_ceil_ull +macro stdc_bit_ceil + +#endif diff --git a/conform/data/stdbool.h-data b/conform/data/stdbool.h-data index a030e9cffe..3c9603a9cc 100644 --- a/conform/data/stdbool.h-data +++ b/conform/data/stdbool.h-data @@ -1,10 +1,14 @@ #if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 + +#if !defined ISO23 macro bool macro-int-constant true {int} == 1 macro-int-constant false {int} == 0 +#endif + macro-int-constant __bool_true_false_are_defined {int} == 1 -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif #endif diff --git a/conform/data/stdckdint.h-data b/conform/data/stdckdint.h-data new file mode 100644 index 0000000000..ae10112045 --- /dev/null +++ b/conform/data/stdckdint.h-data @@ -0,0 +1,7 @@ +#if defined ISO23 + +macro ckd_add +macro ckd_sub +macro ckd_mul + +#endif diff --git a/conform/data/stddef.h-data b/conform/data/stddef.h-data index 9ded4f1ca0..d784c4074a 100644 --- a/conform/data/stddef.h-data +++ b/conform/data/stddef.h-data @@ -6,10 +6,15 @@ type ptrdiff_t type wchar_t type size_t -#if defined ISO11 +#if defined ISO11 || defined ISO23 type max_align_t #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if defined ISO23 +type nullptr_t +macro unreachable +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif diff --git a/conform/data/stdint.h-data b/conform/data/stdint.h-data index 5d65d4ecd5..709abdfd77 100644 --- a/conform/data/stdint.h-data +++ b/conform/data/stdint.h-data @@ -35,69 +35,168 @@ type uintmax_t macro-int-constant INT8_MIN {promoted:int8_t} == -128 macro-int-constant INT8_MAX {promoted:int8_t} == 127 +#if defined ISO23 +macro-int-constant INT8_WIDTH == 8 +#endif macro-int-constant INT16_MIN {promoted:int16_t} == -32768 macro-int-constant INT16_MAX {promoted:int16_t} == 32767 +#if defined ISO23 +macro-int-constant INT16_WIDTH == 16 +#endif macro-int-constant INT32_MIN {promoted:int32_t} == -2147483647-1 macro-int-constant INT32_MAX {promoted:int32_t} == 2147483647 +#if defined ISO23 +macro-int-constant INT32_WIDTH == 32 +#endif macro-int-constant INT64_MIN {promoted:int64_t} == -9223372036854775807LL-1 macro-int-constant INT64_MAX {promoted:int64_t} == 9223372036854775807LL +#if defined ISO23 +macro-int-constant INT64_WIDTH == 64 +#endif macro-int-constant UINT8_MAX {promoted:uint8_t} == 255 +#if defined ISO23 +macro-int-constant UINT8_WIDTH == 8 +#endif macro-int-constant UINT16_MAX {promoted:uint16_t} == 65535 +#if defined ISO23 +macro-int-constant UINT16_WIDTH == 16 +#endif macro-int-constant UINT32_MAX {promoted:uint32_t} == 4294967295U +#if defined ISO23 +macro-int-constant UINT32_WIDTH == 32 +#endif macro-int-constant UINT64_MAX {promoted:uint64_t} == 18446744073709551615ULL +#if defined ISO23 +macro-int-constant UINT64_WIDTH == 64 +#endif macro-int-constant INT_LEAST8_MIN {promoted:int_least8_t} <= -128 macro-int-constant INT_LEAST8_MAX {promoted:int_least8_t} >= 127 +#if defined ISO23 +macro-int-constant INT_LEAST8_WIDTH >= 8 +#endif macro-int-constant INT_LEAST16_MIN {promoted:int_least16_t} <= -32768 macro-int-constant INT_LEAST16_MAX {promoted:int_least16_t} >= 32767 +#if defined ISO23 +macro-int-constant INT_LEAST16_WIDTH >= 16 +#endif macro-int-constant INT_LEAST32_MIN {promoted:int_least32_t} <= -2147483647-1 macro-int-constant INT_LEAST32_MAX {promoted:int_least32_t} >= 2147483647 +#if defined ISO23 +macro-int-constant INT_LEAST32_WIDTH >= 32 +#endif macro-int-constant INT_LEAST64_MIN {promoted:int_least64_t} <= -9223372036854775807LL-1 macro-int-constant INT_LEAST64_MAX {promoted:int_least64_t} >= 9223372036854775807LL +#if defined ISO23 +macro-int-constant INT_LEAST64_WIDTH >= 64 +#endif macro-int-constant UINT_LEAST8_MAX {promoted:uint_least8_t} >= 255 +#if defined ISO23 +macro-int-constant UINT_LEAST8_WIDTH >= 8 +#endif macro-int-constant UINT_LEAST16_MAX {promoted:uint_least16_t} >= 65535 +#if defined ISO23 +macro-int-constant UINT_LEAST16_WIDTH >= 16 +#endif macro-int-constant UINT_LEAST32_MAX {promoted:uint_least32_t} >= 4294967295U +#if defined ISO23 +macro-int-constant UINT_LEAST32_WIDTH >= 32 +#endif macro-int-constant UINT_LEAST64_MAX {promoted:uint_least64_t} >= 18446744073709551615ULL +#if defined ISO23 +macro-int-constant UINT_LEAST64_WIDTH >= 64 +#endif macro-int-constant INT_FAST8_MIN {promoted:int_fast8_t} <= -128 macro-int-constant INT_FAST8_MAX {promoted:int_fast8_t} >= 127 +#if defined ISO23 +macro-int-constant INT_FAST8_WIDTH >= 8 +#endif macro-int-constant INT_FAST16_MIN {promoted:int_fast16_t} <= -32768 macro-int-constant INT_FAST16_MAX {promoted:int_fast16_t} >= 32767 +#if defined ISO23 +macro-int-constant INT_FAST16_WIDTH >= 16 +#endif macro-int-constant INT_FAST32_MIN {promoted:int_fast32_t} <= -2147483647-1 macro-int-constant INT_FAST32_MAX {promoted:int_fast32_t} >= 2147483647 +#if defined ISO23 +macro-int-constant INT_FAST32_WIDTH >= 32 +#endif macro-int-constant INT_FAST64_MIN {promoted:int_fast64_t} <= -9223372036854775807LL-1 macro-int-constant INT_FAST64_MAX {promoted:int_fast64_t} >= 9223372036854775807LL +#if defined ISO23 +macro-int-constant INT_FAST64_WIDTH >= 64 +#endif macro-int-constant UINT_FAST8_MAX {promoted:uint_fast8_t} >= 255 +#if defined ISO23 +macro-int-constant UINT_FAST8_WIDTH >= 8 +#endif macro-int-constant UINT_FAST16_MAX {promoted:uint_fast16_t} >= 65535 +#if defined ISO23 +macro-int-constant UINT_FAST16_WIDTH >= 16 +#endif macro-int-constant UINT_FAST32_MAX {promoted:uint_fast32_t} >= 4294967295U +#if defined ISO23 +macro-int-constant UINT_FAST32_WIDTH >= 32 +#endif macro-int-constant UINT_FAST64_MAX {promoted:uint_fast64_t} >= 18446744073709551615ULL +#if defined ISO23 +macro-int-constant UINT_FAST64_WIDTH >= 64 +#endif macro-int-constant INTPTR_MIN {promoted:intptr_t} <= -32768 macro-int-constant INTPTR_MAX {promoted:intptr_t} >= 32767 +#if defined ISO23 +macro-int-constant INTPTR_WIDTH >= 16 +#endif macro-int-constant UINTPTR_MAX {promoted:uintptr_t} >= 65535 +#if defined ISO23 +macro-int-constant UINTPTR_WIDTH >= 16 +#endif macro-int-constant INTMAX_MIN {promoted:intmax_t} <= -9223372036854775807LL-1 macro-int-constant INTMAX_MAX {promoted:intmax_t} >= 9223372036854775807LL +#if defined ISO23 +macro-int-constant INTMAX_WIDTH >= 64 +#endif macro-int-constant UINTMAX_MAX {promoted:uintmax_t} >= 18446744073709551615ULL +#if defined ISO23 +macro-int-constant UINTMAX_WIDTH >= 64 +#endif macro-int-constant PTRDIFF_MIN {promoted:__PTRDIFF_TYPE__} <= -65535 macro-int-constant PTRDIFF_MAX {promoted:__PTRDIFF_TYPE__} >= 65535 +#if defined ISO23 +macro-int-constant PTRDIFF_WIDTH >= 16 +#endif macro-int-constant SIG_ATOMIC_MIN {size:__SIG_ATOMIC_WIDTH__} macro-int-constant SIG_ATOMIC_MAX {size:__SIG_ATOMIC_WIDTH__} >= 127 +#if defined ISO23 +macro-int-constant SIG_ATOMIC_WIDTH >= 8 +#endif macro-int-constant SIZE_MAX {promoted:__SIZE_TYPE__} >= 65535 +#if defined ISO23 +macro-int-constant SIZE_WIDTH >= 16 +#endif macro-int-constant WCHAR_MIN {promoted:__WCHAR_TYPE__} macro-int-constant WCHAR_MAX {promoted:__WCHAR_TYPE__} >= 127 +#if defined ISO23 +macro-int-constant WCHAR_WIDTH >= 8 +#endif macro-int-constant WINT_MIN {promoted:__WINT_TYPE__} macro-int-constant WINT_MAX {promoted:__WINT_TYPE__} >= 127 +#if defined ISO23 +macro-int-constant WINT_WIDTH >= 16 +#endif macro INT8_C macro INT16_C diff --git a/conform/data/stdio.h-data b/conform/data/stdio.h-data index 3ef2460661..1be80b47b0 100644 --- a/conform/data/stdio.h-data +++ b/conform/data/stdio.h-data @@ -6,7 +6,7 @@ macro-int-constant _IOFBF macro-int-constant _IOLBF macro-int-constant _IONBF -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 constant L_ctermid # if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 # ifdef POSIX @@ -28,7 +28,7 @@ macro-int-constant EOF < 0 macro-constant NULL == 0 -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 constant P_tmpdir #endif @@ -38,7 +38,7 @@ macro stderr {FILE *} type FILE type fpos_t -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX type va_list #else #define va_list __gnuc_va_list @@ -50,7 +50,7 @@ type ssize_t #endif function void clearerr (FILE*) -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 function {char*} ctermid (char*) # if defined XPG4 || defined XPG42 || defined UNIX98 function {char*} cuserid (char*) @@ -60,7 +60,7 @@ function {char*} cuserid (char*) function int dprintf (int, const char*, ...) #endif function int fclose (FILE*) -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 function {FILE*} fdopen (int, const char*) #endif function int feof (FILE*) @@ -69,7 +69,7 @@ function int fflush (FILE*) function int fgetc (FILE*) function int fgetpos (FILE*, fpos_t*) function {char*} fgets (char*, int, FILE*) -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 function int fileno (FILE*) #endif #if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 @@ -112,7 +112,7 @@ function ssize_t getline (char**, size_t*, FILE*) #if defined XPG4 || defined XPG42 || defined UNIX98 function int getopt (int, char *const[], const char *) #endif -#if !defined ISO11 +#if !defined ISO11 && !defined ISO23 function {char*} gets (char*) #endif #if defined XPG4 || defined XPG42 || defined UNIX98 @@ -121,11 +121,11 @@ function int getw (FILE*) #if defined XOPEN2K8 || defined POSIX2008 function {FILE*} open_memstream (char**, size_t*) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 function int pclose (FILE*) #endif function void perror (const char*) -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 function {FILE*} popen (const char*, const char*) #endif function int printf (const char*, ...) @@ -178,7 +178,7 @@ function int vsprintf (char*, const char*, va_list) function int vsscanf (const char*, const char*, va_list) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 #if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 variable {char*} optarg variable int opterr diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data index 6913828196..0f6da09166 100644 --- a/conform/data/stdlib.h-data +++ b/conform/data/stdlib.h-data @@ -12,7 +12,7 @@ macro-constant NULL == 0 macro-int-constant RAND_MAX >= 32767 macro MB_CUR_MAX -#if defined ISO99 || defined ISO11 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if defined ISO99 || defined ISO11 || defined ISO23 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 type lldiv_t element lldiv_t {long long} quot element lldiv_t {long long} rem @@ -20,7 +20,7 @@ element lldiv_t {long long} rem type size_t type wchar_t -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX constant WNOHANG constant WUNTRACED @@ -35,16 +35,16 @@ macro WTERMSIG #if !defined ISO && !defined XPG4 && !defined XPG42 && !defined UNIX98 && !defined POSIX function void _Exit (int) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function long a64l (const char*) #endif function void abort (void) function int abs (int) -#if defined ISO11 +#if defined ISO11 || defined ISO23 function {void *} aligned_alloc (size_t, size_t) #endif function int atexit (void(*)(void)) -#if defined ISO11 +#if defined ISO11 || defined ISO23 function int at_quick_exit (void (*) (void)) #endif function double atof (const char*) @@ -56,13 +56,13 @@ function {long long} atoll (const char*) function {void*} bsearch (const void*, const void*, size_t, size_t, int(*)(const void*, const void*)) function {void*} calloc (size_t, size_t) function div_t div (int, int) -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function double drand48 (void) #endif #if defined XPG42 || defined UNIX98 || defined XOPEN2K function {char*} ecvt (double, int, int*, int*) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function double erand48 (unsigned short int[3]) #endif function void exit (int) @@ -74,21 +74,21 @@ function void free (void*) function {char*} gcvt (double, int, char*) #endif function {char*} getenv (const char*) -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX function int getsubopt (char**, char *const*, char**) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function int grantpt (int) function {char*} initstate (unsigned int, char*, size_t) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function {long int} jrand48 (unsigned short int[3]) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function {char*} l64a (long) #endif function {long int} labs (long int) -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function void lcong48 (unsigned short int[7]) #endif function ldiv_t ldiv (long int, long int) @@ -96,7 +96,7 @@ function ldiv_t ldiv (long int, long int) function {long long} llabs (long long) function lldiv_t lldiv (long long, long long) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function {long int} lrand48 (void) #endif function {void*} malloc (size_t) @@ -106,13 +106,13 @@ function int mbtowc (wchar_t*, const char*, size_t) #if defined XOPEN2K8 || defined POSIX2008 function {char*} mkdtemp (char*) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 function {char*} mktemp (char*) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX function int mkstemp (char*) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function {long int} mrand48 (void) function {long int} nrand48 (unsigned short int[3]) #endif @@ -122,41 +122,41 @@ function int posix_memalign (void**, size_t, size_t) #if defined XOPEN2K || defined XOPEN2K8 function int posix_openpt (int) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function {char*} ptsname (int) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function int putenv (char*) #endif function void qsort (void*, size_t, size_t, int(*)(const void*, const void*)) -#if defined ISO11 +#if defined ISO11 || defined ISO23 function void quick_exit (int) #endif function int rand (void) #if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int rand_r (unsigned int*) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function long random (void) #endif function {void*} realloc (void*, size_t) -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function {char*} realpath (const char*, char*) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function {unsigned short int*} seed48 (unsigned short int[3]) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function int setenv (const char*, const char*, int) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function {char*} setstate (char*) #endif function void srand (unsigned int) -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function void srand48 (long int) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function void srandom (unsigned) #endif function double strtod (const char*, char**) @@ -174,10 +174,10 @@ function int system (const char*) #if defined XPG42 || defined UNIX98 function int ttyslot (void) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function int unlockpt (int) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function int unsetenv (const char*) #endif #if defined XPG42 || defined UNIX98 @@ -186,7 +186,7 @@ function {void*} valloc (size_t) function size_t wcstombs (char*, const wchar_t*, size_t) function int wctomb (char*, wchar_t) -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX allow-header stddef.h allow-header limits.h allow-header math.h @@ -194,6 +194,6 @@ allow-header sys/wait.h #endif allow str[abcdefghijklmnopqrstuvwxyz]* -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif diff --git a/conform/data/stdnoreturn.h-data b/conform/data/stdnoreturn.h-data index 77b9a589d8..fa83c4f558 100644 --- a/conform/data/stdnoreturn.h-data +++ b/conform/data/stdnoreturn.h-data @@ -1,3 +1,3 @@ -#if defined ISO11 +#if defined ISO11 || defined ISO23 macro noreturn #endif diff --git a/conform/data/string.h-data b/conform/data/string.h-data index e06f941498..8cda133428 100644 --- a/conform/data/string.h-data +++ b/conform/data/string.h-data @@ -5,7 +5,7 @@ type size_t type locale_t #endif -#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function {void*} memccpy (void*, const void*, int, size_t) #endif function {void*} memchr (const void*, int, size_t) @@ -27,7 +27,7 @@ function int strcoll_l (const char*, const char*, locale_t) #endif function {char*} strcpy (char*, const char*) function size_t strcspn (const char*, const char*) -#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined ISO23 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function {char*} strdup (const char*) #endif function {char*} strerror (int) @@ -61,13 +61,13 @@ function size_t strxfrm (char*, const char*, size_t) function size_t strxfrm_l (char*, const char*, size_t, locale_t) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX allow-header stddef.h #endif allow str[abcdefghijklmnopqrstuvwxyz]* allow mem[abcdefghijklmnopqrstuvwxyz]* allow wcs[abcdefghijklmnopqrstuvwxyz]* -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif diff --git a/conform/data/strings.h-data b/conform/data/strings.h-data index 13827ebed9..b5d352ff32 100644 --- a/conform/data/strings.h-data +++ b/conform/data/strings.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 # if !defined XOPEN2K8 && !defined POSIX2008 function int bcmp (const void*, const void*, size_t) function void bcopy (const void*, void*, size_t) diff --git a/conform/data/sys/ipc.h-data b/conform/data/sys/ipc.h-data index 1364b07e87..e157257e8a 100644 --- a/conform/data/sys/ipc.h-data +++ b/conform/data/sys/ipc.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 type {struct ipc_perm} // Bug 23082: uid/gid/cuid/cgid/mode have type unsigned short instead of uid_t and mode_t. diff --git a/conform/data/sys/mman.h-data b/conform/data/sys/mman.h-data index a74388338e..b742b900d6 100644 --- a/conform/data/sys/mman.h-data +++ b/conform/data/sys/mman.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4 constant PROT_READ constant PROT_WRITE constant PROT_EXEC diff --git a/conform/data/sys/msg.h-data b/conform/data/sys/msg.h-data index f5e9f1c82a..93df6fd656 100644 --- a/conform/data/sys/msg.h-data +++ b/conform/data/sys/msg.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 type {struct msqid_ds} type msgqnum_t diff --git a/conform/data/sys/resource.h-data b/conform/data/sys/resource.h-data index cedbee1a40..ba247e3d26 100644 --- a/conform/data/sys/resource.h-data +++ b/conform/data/sys/resource.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 && !defined XPG4 constant PRIO_PROCESS constant PRIO_PGRP constant PRIO_USER diff --git a/conform/data/sys/select.h-data b/conform/data/sys/select.h-data index 44d63ebd2d..9406eaea0c 100644 --- a/conform/data/sys/select.h-data +++ b/conform/data/sys/select.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 type time_t type suseconds_t diff --git a/conform/data/sys/sem.h-data b/conform/data/sys/sem.h-data index a36ab1bd91..f34541c447 100644 --- a/conform/data/sys/sem.h-data +++ b/conform/data/sys/sem.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 constant SEM_UNDO constant GETNCNT diff --git a/conform/data/sys/shm.h-data b/conform/data/sys/shm.h-data index 778b194f50..a9d2539e47 100644 --- a/conform/data/sys/shm.h-data +++ b/conform/data/sys/shm.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 constant SHM_RDONLY symbol SHMLBA constant SHM_RND diff --git a/conform/data/sys/socket.h-data b/conform/data/sys/socket.h-data index 8796c57570..d00504bd31 100644 --- a/conform/data/sys/socket.h-data +++ b/conform/data/sys/socket.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 type socklen_t type sa_family_t diff --git a/conform/data/sys/stat.h-data b/conform/data/sys/stat.h-data index 03be4814ec..ba80a5adc6 100644 --- a/conform/data/sys/stat.h-data +++ b/conform/data/sys/stat.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 #if !defined POSIX && !defined POSIX2008 && !defined XPG4 && !defined XPG42 type blkcnt_t diff --git a/conform/data/sys/statvfs.h-data b/conform/data/sys/statvfs.h-data index 2a74813e3d..712fbcf47a 100644 --- a/conform/data/sys/statvfs.h-data +++ b/conform/data/sys/statvfs.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 type {struct statvfs} element {struct statvfs} {unsigned long} f_bsize diff --git a/conform/data/sys/time.h-data b/conform/data/sys/time.h-data index 30523e1af4..df5b6b9730 100644 --- a/conform/data/sys/time.h-data +++ b/conform/data/sys/time.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 && !defined XPG4 type {struct timeval} element {struct timeval} time_t tv_sec diff --git a/conform/data/sys/timeb.h-data b/conform/data/sys/timeb.h-data index 9638f73c8f..a1db569621 100644 --- a/conform/data/sys/timeb.h-data +++ b/conform/data/sys/timeb.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008 && !defined XOPEN2K8 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined XPG4 && !defined POSIX2008 && !defined XOPEN2K8 type {struct timeb} element {struct timeb} time_t time diff --git a/conform/data/sys/times.h-data b/conform/data/sys/times.h-data index c93357b793..c4c3edf814 100644 --- a/conform/data/sys/times.h-data +++ b/conform/data/sys/times.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 type {struct tms} element {struct tms} clock_t tms_utime diff --git a/conform/data/sys/types.h-data b/conform/data/sys/types.h-data index cc28eb76d4..3330f9e195 100644 --- a/conform/data/sys/types.h-data +++ b/conform/data/sys/types.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 #if !defined POSIX # if !defined XPG4 && !defined XPG42 type blkcnt_t diff --git a/conform/data/sys/uio.h-data b/conform/data/sys/uio.h-data index b9fc66177c..6da312c9dd 100644 --- a/conform/data/sys/uio.h-data +++ b/conform/data/sys/uio.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined XPG4 && !defined POSIX2008 type {struct iovec} element {struct iovec} {void*} iov_base diff --git a/conform/data/sys/un.h-data b/conform/data/sys/un.h-data index 08bf9bcfd7..8114024c8c 100644 --- a/conform/data/sys/un.h-data +++ b/conform/data/sys/un.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 type {struct sockaddr_un} element {struct sockaddr_un} sa_family_t sun_family diff --git a/conform/data/sys/utsname.h-data b/conform/data/sys/utsname.h-data index 82f7f397ca..f9045e38fb 100644 --- a/conform/data/sys/utsname.h-data +++ b/conform/data/sys/utsname.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 type {struct utsname} element {struct utsname} char sysname [] diff --git a/conform/data/sys/wait.h-data b/conform/data/sys/wait.h-data index a6713461ea..5998748a23 100644 --- a/conform/data/sys/wait.h-data +++ b/conform/data/sys/wait.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 #ifdef POSIX # define pid_t __pid_t #endif diff --git a/conform/data/syslog.h-data b/conform/data/syslog.h-data index 6604d76d3e..f72734d8f9 100644 --- a/conform/data/syslog.h-data +++ b/conform/data/syslog.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 && !defined XPG4 constant LOG_PID constant LOG_CONS constant LOG_NDELAY diff --git a/conform/data/tar.h-data b/conform/data/tar.h-data index 8477860e57..43b2d0555c 100644 --- a/conform/data/tar.h-data +++ b/conform/data/tar.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 macro-str TMAGIC "ustar" macro-int-constant TMAGLEN {int} == 6 macro-str TVERSION "00" diff --git a/conform/data/termios.h-data b/conform/data/termios.h-data index bb2092bb6f..87fbcb9565 100644 --- a/conform/data/termios.h-data +++ b/conform/data/termios.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 type cc_t type speed_t type tcflag_t diff --git a/conform/data/tgmath.h-data b/conform/data/tgmath.h-data index d852adc3e4..e7ffb629b1 100644 --- a/conform/data/tgmath.h-data +++ b/conform/data/tgmath.h-data @@ -63,4 +63,15 @@ macro cimag macro conj macro cproj macro creal + +#if defined ISO23 +macro dadd +macro dadd +macro ddiv +macro dfma +macro dmul +macro dsqrt +macro dsub +#endif + #endif diff --git a/conform/data/threads.h-data b/conform/data/threads.h-data index 406e497726..efd01281b5 100644 --- a/conform/data/threads.h-data +++ b/conform/data/threads.h-data @@ -1,7 +1,9 @@ -#if defined ISO11 +#if defined ISO11 || defined ISO23 macro ONCE_FLAG_INIT +#if !defined ISO23 macro thread_local +#endif macro-int-constant TSS_DTOR_ITERATIONS constant thrd_success diff --git a/conform/data/time.h-data b/conform/data/time.h-data index 9c1c19596e..86dba0b5b6 100644 --- a/conform/data/time.h-data +++ b/conform/data/time.h-data @@ -1,7 +1,7 @@ macro-constant NULL == 0 macro CLOCKS_PER_SEC {clock_t} -#ifdef ISO11 +#if defined ISO11 || defined ISO23 macro-int-constant TIME_UTC > 0 #endif @@ -38,11 +38,18 @@ function {char*} ctime (const time_t*) function {struct tm*} gmtime (const time_t*) function {struct tm*} localtime (const time_t*) function size_t strftime (char*, size_t, const char*, const struct tm*) -#if defined ISO11 +#if defined ISO11 || defined ISO23 function int timespec_get (struct timespec *, int) #endif +#if defined ISO23 +function int timespec_getres (struct timespec *, int) +function time_t timegm (struct tm *) +function {struct tm *} gmtime_r (const time_t *, struct tm *) +function {struct tm *} localtime_r (const time_t *, struct tm *) +#endif + -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 # if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 symbol CLK_TCK # endif diff --git a/conform/data/uchar.h-data b/conform/data/uchar.h-data index ef27617bc4..9da70de95f 100644 --- a/conform/data/uchar.h-data +++ b/conform/data/uchar.h-data @@ -1,9 +1,16 @@ -#if defined ISO11 +#if defined ISO11 || defined ISO23 type mbstate_t type size_t +#if defined ISO23 +type char8_t +#endif type char16_t type char32_t +#if defined ISO23 +function size_t mbrtoc8 (char8_t *, const char *, size_t, mbstate_t *) +function size_t c8rtomb (char *, char8_t, mbstate_t *) +#endif function size_t mbrtoc16 (char16_t *, const char *, size_t, mbstate_t *) function size_t c16rtomb (char *, char16_t, mbstate_t *) function size_t mbrtoc32 (char32_t *, const char *, size_t, mbstate_t *) diff --git a/conform/data/ucontext.h-data b/conform/data/ucontext.h-data index e3dcb3014b..414635f664 100644 --- a/conform/data/ucontext.h-data +++ b/conform/data/ucontext.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008 && !defined XOPEN2K8 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined XPG4 && !defined POSIX2008 && !defined XOPEN2K8 type mcontext_t type ucontext_t diff --git a/conform/data/ulimit.h-data b/conform/data/ulimit.h-data index 1e5e5b471d..fbe3ec25f4 100644 --- a/conform/data/ulimit.h-data +++ b/conform/data/ulimit.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 constant UL_GETFSIZE constant UL_SETFSIZE diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data index aa070528e8..b4531868fd 100644 --- a/conform/data/unistd.h-data +++ b/conform/data/unistd.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 #ifdef POSIX # define uid_t __uid_t # define gid_t __gid_t diff --git a/conform/data/utime.h-data b/conform/data/utime.h-data index e3201651c1..2ca26efab2 100644 --- a/conform/data/utime.h-data +++ b/conform/data/utime.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 #ifdef POSIX # define time_t __time_t #endif diff --git a/conform/data/utmpx.h-data b/conform/data/utmpx.h-data index cfe2a08634..28ad96a486 100644 --- a/conform/data/utmpx.h-data +++ b/conform/data/utmpx.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 && !defined XPG4 type {struct utmpx} element {struct utmpx} char ut_user [] diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data index 243321090d..4c8a2e3c82 100644 --- a/conform/data/wchar.h-data +++ b/conform/data/wchar.h-data @@ -1,11 +1,11 @@ #if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 type wchar_t type wint_t -# if !defined ISO99 && !defined ISO11 && !defined POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX2008 type wctype_t # endif type mbstate_t -# if !defined ISO99 && !defined ISO11 +# if !defined ISO99 && !defined ISO11 && !defined ISO23 type FILE # else # define FILE __FILE @@ -15,7 +15,7 @@ type size_t type locale_t # endif tag {struct tm} -# if !defined ISO99 && !defined ISO11 && !defined UNIX98 +# if !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined UNIX98 type va_list # else # define va_list __gnuc_va_list @@ -24,7 +24,7 @@ type va_list function wint_t btowc (int) function int fwprintf (FILE*, const wchar_t*, ...) function int fwscanf (FILE*, const wchar_t*, ...) -# if !defined ISO99 && !defined ISO11 && !defined POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX2008 function int iswalnum (wint_t) function int iswalpha (wint_t) function int iswcntrl (wint_t) @@ -59,7 +59,7 @@ function wint_t putwc (wchar_t, FILE*) function wint_t putwchar (wchar_t) function int swprintf (wchar_t*, size_t, const wchar_t*, ...) function int swscanf (const wchar_t*, const wchar_t*, ...) -# if !defined ISO99 && !defined ISO11 && !defined POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX2008 function wint_t towlower (wint_t) function wint_t towupper (wint_t) # endif @@ -132,7 +132,7 @@ function {unsigned long long int} wcstoull (const wchar_t*, wchar_t**, int) # if defined UNIX98 || defined XOPEN2K function {wchar_t*} wcswcs (const wchar_t*, const wchar_t*) # endif -# if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 function int wcswidth (const wchar_t*, size_t) # endif function size_t wcsxfrm (wchar_t*, const wchar_t*, size_t) @@ -140,7 +140,7 @@ function size_t wcsxfrm (wchar_t*, const wchar_t*, size_t) function size_t wcsxfrm_l (wchar_t*, const wchar_t*, size_t, locale_t) # endif function int wctob (wint_t) -# if !defined ISO99 && !defined ISO11 && !defined POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX2008 function wctype_t wctype (const char*) function int wcwidth (wchar_t) # endif @@ -157,7 +157,7 @@ macro-int-constant WCHAR_MAX {promoted:wchar_t} >= 127 macro-constant WEOF {wint_t} macro-constant NULL == 0 -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow-header ctype.h allow-header stdio.h allow-header stdarg.h @@ -168,7 +168,7 @@ allow-header time.h #endif allow wcs[abcdefghijklmnopqrstuvwxyz]* -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif #endif diff --git a/conform/data/wctype.h-data b/conform/data/wctype.h-data index 944fe6efab..f939f3c652 100644 --- a/conform/data/wctype.h-data +++ b/conform/data/wctype.h-data @@ -49,7 +49,7 @@ function wctype_t wctype_l (const char*, locale_t) macro-constant WEOF {wint_t} -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow-header ctype.h allow-header stdio.h allow-header stdarg.h @@ -62,7 +62,7 @@ allow-header wchar.h allow is[abcdefghijklmnopqrstuvwxyz]* allow to[abcdefghijklmnopqrstuvwxyz]* -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 allow *_t #endif #endif diff --git a/conform/data/wordexp.h-data b/conform/data/wordexp.h-data index 0d96d68edc..eed4754e0c 100644 --- a/conform/data/wordexp.h-data +++ b/conform/data/wordexp.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 type wordexp_t element wordexp_t size_t we_wordc diff --git a/conform/glibcconform.py b/conform/glibcconform.py index 7086bc6f93..0c8664a25b 100644 --- a/conform/glibcconform.py +++ b/conform/glibcconform.py @@ -24,9 +24,12 @@ # Compiler options for each standard. +# We use -std=c2x instead of -std=c23 since glibc supports GCC 12.1 which +# predates -std=c23. CFLAGS = {'ISO': '-ansi', 'ISO99': '-std=c99', 'ISO11': '-std=c11', + 'ISO23': '-std=c2x', 'POSIX': '-D_POSIX_C_SOURCE=199506L -ansi', 'XPG4': '-ansi -D_XOPEN_SOURCE', 'XPG42': '-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED', @@ -45,10 +48,19 @@ # ISO C99 keywords. KEYWORDS_C99 = KEYWORDS_C90 | {'inline', 'restrict'} +# ISO C23 keywords. +KEYWORDS_C23 = KEYWORDS_C99 | {'_Alignas', '_Alignof', '_BitInt', '_Bool', + '_Decimal128', '_Decimal32', '_Decimal64', + '_Static_assert', '_Thread_local', 'alignas', + 'alignof', 'bool', 'constexpr', 'false', + 'nullptr', 'static_assert', 'thread_local', + 'true', 'typeof', 'typeof_unqual'} + # Keywords for each standard. KEYWORDS = {'ISO': KEYWORDS_C90, 'ISO99': KEYWORDS_C99, 'ISO11': KEYWORDS_C99, + 'ISO23': KEYWORDS_C23, 'POSIX': KEYWORDS_C90, 'XPG4': KEYWORDS_C90, 'XPG42': KEYWORDS_C90, diff --git a/conform/list-header-symbols.py b/conform/list-header-symbols.py index 535781b4bd..b54396ddea 100644 --- a/conform/list-header-symbols.py +++ b/conform/list-header-symbols.py @@ -33,6 +33,7 @@ # the generic functions there or may not be defined with external # linkage (but are reserved in any case). EXTRA_SYMS['ISO11'] = EXTRA_SYMS['ISO99'] +EXTRA_SYMS['ISO23'] = EXTRA_SYMS['ISO11'] # The following lists may not be exhaustive. EXTRA_SYMS['POSIX'] = (EXTRA_SYMS['ISO'] | {'environ', 'sigsetjmp', 'optarg', 'optind', 'opterr',