From nobody Wed Aug 26 02:51:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hV8Ls4FDnz6qTLP; Wed, 26 Aug 2026 02:52:05 +0000 (UTC) (envelope-from dtf@shxd.cx) Received: from shxd.cx (shxd.cx [207.231.82.159]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4hV8Ls1204z3DQ5; Wed, 26 Aug 2026 02:52:05 +0000 (UTC) (envelope-from dtf@shxd.cx) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=shxd.cx; s=shxd2024; h=Sender:To:References:Message-Id:Content-Transfer-Encoding:Cc: Date:In-Reply-To:From:Subject:Mime-Version:Content-Type:Reply-to:Content-ID: Content-Description; bh=peGVG7NXCcKHEJD7jh+RxG+3isHi6X2cSMQjODMrQng=; b=M3qcV rfjsKuY5mIdYbhDo62j+To5QceKW/2WQcFMBgdA0PeZvfWAfYJzYPd7JySoQhJhRR8Olp5ICIgQ5m YTjSbPa/OC2XwMbV2dfwB4Mzbv7NvmjGKyHQTw3LszP5jRFh0ZkrxkEjOfmNETgLho2gCXNPO00Nt y+EkOMmyYBq4=; Received: from lummox.shxd.cx ([10.0.0.254]:55989 helo=smtpclient.apple) by shxd.cx with esmtpsa (TLS1.2) tls TLS_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1 (FreeBSD)) (envelope-from ) id 1wz3jj-000000002qd-12Ct; Tue, 25 Aug 2026 19:51:35 -0700 Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: git: 8d29d2429649 - main - libc: Restore prior C23 include guards From: Devin Teske In-Reply-To: <86ecfm3y0g.fsf@ltc.des.dev> Date: Tue, 25 Aug 2026 19:51:52 -0700 Cc: Faraz Vahedi , Warner Losh , src-committers , "" , "" , Devin Teske Content-Transfer-Encoding: quoted-printable Message-Id: <5E276341-DFB3-46A6-B533-CFBE2D35D762@freebsd.org> References: <6a85843a.3287f.2aec5cf8@gitrepo.freebsd.org> <865x0z6526.fsf@ltc.des.dev> <86wltf4mz8.fsf@ltc.des.dev> <86ik4y4gsv.fsf@ltc.des.dev> <730AFA99-F6E9-4D78-BE52-54E1DEE3ABF4@freebsd.org> <86ecfm3y0g.fsf@ltc.des.dev> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3864.600.51.1.1) X-Rspamd-Queue-Id: 4hV8Ls1204z3DQ5 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:14051, ipnet:207.231.64.0/19, country:US] X-Spamd-Bar: ---- : at_start: {auth_results {shxd.cx}} > On Aug 25, 2026, at 10:34=E2=80=AFAM, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > Devin Teske writes: >> If someone uses __STDC_VERSION_*_H__ to inject C23 syntax of their >> own, they are asking the advertisement to do visibility's job. I may >> be missing a case where that is the right test; I have not found it = in >> 7.1.2p6 yet. >=20 > Imagine a single-header library (i.e. a big collection of static = inline > functions) that uses __STDC_VERSION_FOO_H__ to choose between a C23 > solution and a backward-compatible solution. This header is then > included in a C99 program and fails because we are advertising C23 > features to a C99 program. It's really not that hard to understand. >=20 >> Your predicate (__ISO_C_VISIBLE >=3D 2023 || __BSD_VISIBLE) would = make >> the macros mean "this compilation can see C23 semantics from this >> header." That is a policy we can talk about on its own. I would >> rather not fold it into the _FOO_H_ restore, which was only POLA = after >> gmp. >=20 > I don't know what you mean with =E2=80=9Cfold it into the _FOO_H_ = restore=E2=80=9D. The > =E2=80=9C_FOO_H_ restore=E2=80=9D has already happened and we're not = going to rewrite > history. I am asking for this feature to be implemented correctly. >=20 (combining my response to two people into one e-mail to limit branching = of the thread) DES, You asked what I meant by "fold it into the _FOO_H_ restore," and you wrote that we are not going to rewrite history. I never meant that we would. A later commit can add the #if without touching 8d29d242; one can even reverse a change that way. I did not want the new #if on __STDC_VERSION_*_H__ handled together with putting the old _STDIO_H_-style names back for gmp. DES and Warner, stdio.h defines the macro before it includes cdefs.h. cdefs.h would come first; 77 other headers under /usr/include already test __BSD_VISIBLE. Then the #if as you both named: #include #if __ISO_C_VISIBLE >=3D 2023 || __BSD_VISIBLE #define __STDC_VERSION_STDIO_H__ 202311L #endif Same pattern on the other headers. If you both agree that is the approach, Faraz can put the Differential up. Devin=