NetBSD Problem Report #58605

From www@netbsd.org  Fri Aug 16 10:58:35 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AA2651A9242
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 16 Aug 2024 10:58:35 +0000 (UTC)
Message-Id: <20240816105834.69C671A9243@mollari.NetBSD.org>
Date: Fri, 16 Aug 2024 10:58:34 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: C23: __STDC_*_H__ versions
X-Send-Pr-Version: www-1.0

>Number:         58605
>Category:       standards
>Synopsis:       C23: __STDC_*_H__ versions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    standards-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 16 11:00:01 +0000 2024
>Last-Modified:  Tue Apr 01 00:42:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        current, 10, 9
>Organization:
The __STDC_NETBSD_H__ Version >= 202311L
>Environment:
>Description:
C23 adds __STDC_*_H__ version number macros for its header files, such as this one in <uchar.h>:

#define	__STDC_VERSION_UCHAR_H__	202311L

I added that when creating the new <uchar.h>, but all the other header files need these too.
>How-To-Repeat:
code inspection
>Fix:
Yes, please!

[ ] assert.h __STDC_VERSION_ASSERT_H__
[ ] complex.h __STDC_VERSION_COMPLEX_H__
[ ] fenv.h __STDC_VERSION_FENV_H__
[ ] float.h __STDC_VERSION_FLOAT_H__
[ ] limits.h __STDC_VERSION_LIMITS_H__
[ ] math.h __STDC_VERSION_MATH_H__
[ ] setjmp.h __STDC_VERSION_SETJMP_H__
[ ] stdarg.h __STDC_VERSION_STDARG_H__
[ ] stdatomic.h __STDC_VERSION_STDATOMIC_H__
[ ] stdbit.h __STDC_VERSION_STDBIT_H__
[ ] stdckdint.h __STDC_VERSION_STDCKDINT_H__
[x] stddef.h __STDC_VERSION_STDDEF_H__
[ ] stdint.h __STDC_VERSION_STDINT_H__
[ ] stdio.h __STDC_VERSION_STDIO_H__
[ ] stdlib.h __STDC_VERSION_STDLIB_H__
[ ] string.h __STDC_VERSION_STRING_H__
[ ] tgmath.h __STDC_VERSION_TGMATH_H__
[ ] time.h __STDC_VERSION_TIME_H__
[x] uchar.h __STDC_VERSION_UCHAR_H__
[ ] wchar.h __STDC_VERSION_WCHAR_H__


>Release-Note:

>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58605 CVS commit: src
Date: Tue, 1 Apr 2025 00:33:55 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Tue Apr  1 00:33:55 UTC 2025

 Modified Files:
 	src/distrib/sets/lists/debug: mi
 	src/distrib/sets/lists/tests: mi
 	src/sys/sys: stddef.h
 	src/tests/include: Makefile
 Added Files:
 	src/tests/include: t_stddef.c

 Log Message:
 stddef.h: New nullptr_t, unreachable().

 Define __STDC_VERSION_STDDEF_H__ while here.

 Order content according to standard, and quote the relevant clauses,
 to make it easier to audit.

 PR standards/58605: C23: __STDC_*_H__ versions
 PR standards/58620: C23: <stddef.h> unreachable() macro
 PR standards/58621: C23: <stddef.h> nullptr_t


 To generate a diff of this commit:
 cvs rdiff -u -r1.471 -r1.472 src/distrib/sets/lists/debug/mi
 cvs rdiff -u -r1.1363 -r1.1364 src/distrib/sets/lists/tests/mi
 cvs rdiff -u -r1.1 -r1.2 src/sys/sys/stddef.h
 cvs rdiff -u -r1.10 -r1.11 src/tests/include/Makefile
 cvs rdiff -u -r0 -r1.1 src/tests/include/t_stddef.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.