From owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org  Tue Aug 25 19:15:23 2026
Return-Path: <owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org>
X-Original-To: sc22wg14-domo2
Delivered-To: sc22wg14-domo2@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id B6820356E50; Tue, 25 Aug 2026 19:15:23 +0200 (CEST)
Delivered-To: sc22wg14@open-std.org
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
	by www.open-std.org (Postfix) with ESMTP id 44578356BEF
	for <sc22wg14@open-std.org>; Tue, 25 Aug 2026 19:15:22 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1787678121;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type;
	bh=u2xp7E/jvoeciIuLoMIdrquVgRsDIOglv1YXkEbeZws=;
	b=QErFi/XaSVGgF6KTpQRaLrmVtER9CF0ms9E3pue0FjTVpCtWtl3ZjCcZjeS4MeK1lWeb4E
	Az/mgg0/29AiGT5tWCPqIy7/YQjFpwMKe97IN4v2tQL2noRO+p4GOEzo7qkYcf09SVFILL
	fdwLSpSMJHv1I1MeMbW1pFXhN+b404g=
Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com
 [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
 us-mta-124-PH1RU_y8OiWeiuM-226P-w-1; Tue, 25 Aug 2026 13:15:20 -0400
X-MC-Unique: PH1RU_y8OiWeiuM-226P-w-1
X-Mimecast-MFC-AGG-ID: PH1RU_y8OiWeiuM-226P-w_1787678119
Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-49545071724so42555195e9.0
        for <sc22wg14@open-std.org>; Tue, 25 Aug 2026 10:15:20 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20251104; t=1787678119; x=1788282919;
        h=content-type:mime-version:message-id:subject:to:from:date:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=u2xp7E/jvoeciIuLoMIdrquVgRsDIOglv1YXkEbeZws=;
        b=AYEtr8q22ZwYbqv4iwIMNnYq2OLodwu3WorX6upYNjZjRXz2BqkVBCMXeuF7F1ocqq
         tJllrXQShT7/y/fETxAIoOJs9kUQhUihv63NMUQMpqiEPO7fiUEbWyCoqsQ5GJ0PWNOD
         DPf07fpCL386I+mgdj5ttlN1mByl+Dv4nHDXw1cfTNVIbxBwvE+GIlh94JzjFe+mdRcc
         LPm/pHBGFSH3+YE1V75GHTIqIO50I2pVRPxgCwi1/OZ5LPic6C0/SIArBNaq6NJN5HmG
         Uek5Bvc+PwZPnWFOLVFL6lhJSYEvnA50+oUmCelBMfQe3bvTUkfVwOBC5O+Lmn0/NSzc
         0gTw==
X-Gm-Message-State: AFuF++kIRCIzN6arEOXBeO3QBq5tZB6+3nv/KC8nH8E5w60BD25g89ly
	JBUulSG6Fpa1PaLVX9Cftqz2s4JhdptHxX9Jb12nilst460hd9Q3ZR8B4bHns9wpxy4zE6Ycvdf
	3ugaBM+CkRe4rsXEOEuJqQwuRLltIgE0sFzGZZ/IEkIi/TtNn0wbBXpxNF9plswoiBmrTjyvNyG
	xvZ0koK0tDsepdnfxSS/j00OzQx5fsRuttNdLa3nwL
X-Gm-Gg: AR+sD10vF7Pfs96GSvaEbbLdnWz+P9TicYmbuYoUhUOYikdsfJfYTQ0B2oYl9vAxyFc
	FzevPv3O+q2C6Lyoitsx3Esm/lKxITcDhZoz1reOQvGxvAbsegGVSgmLJVszQ3XX0nqc4icjlfr
	BNloYDC272Y9dcoYNbv6hmV+hkc3oDUAds/1Q4mpNl2N/XHqH6Kh0XU36IVhBHtxVWKGC1Sax1x
	HbesOXSYyV+FLcAd3Rs4Qwfu1B4f+dD7lVBTrb1zmJKoMpNAkuhkxgY24yKkb/9TxURabuTUraH
	H+fjV9qgiUQbv9g44wzviliFj+TtrkOBNfbbhm5LmyP5FQC23s9GnyGeQr35rHk//lNBu4scNy8
	vIeFgXUkTGjr5B7WGMOvYLx6IdGEDVzY=
X-Received: by 2002:a05:600c:1393:b0:495:48d7:f178 with SMTP id 5b1f17b1804b1-499dc7253d8mr3967695e9.11.1787678119203;
        Tue, 25 Aug 2026 10:15:19 -0700 (PDT)
X-Received: by 2002:a05:600c:1393:b0:495:48d7:f178 with SMTP id 5b1f17b1804b1-499dc7253d8mr3967125e9.11.1787678118719;
        Tue, 25 Aug 2026 10:15:18 -0700 (PDT)
Received: from digraph.polyomino.org.uk (digraph.polyomino.org.uk. [2001:8b0:bf73:93f7::51bb:e332])
        by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-499dc9ad772sm853085e9.10.2026.08.25.10.15.17
        for <sc22wg14@open-std.org>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Tue, 25 Aug 2026 10:15:17 -0700 (PDT)
Received: from jsm28 (helo=localhost)
	by digraph.polyomino.org.uk with local-esmtp (Exim 4.98.2)
	(envelope-from <josmyers@redhat.com>)
	id 1wyuk0-00000006Xny-3FHR
	for sc22wg14@open-std.org;
	Tue, 25 Aug 2026 17:15:16 +0000
Date: Tue, 25 Aug 2026 17:15:16 +0000 (UTC)
From: Joseph Myers <josmyers@redhat.com>
To: sc22wg14@open-std.org
Subject: Standard library typedef redeclaration response (issue 1024)
Message-ID: <1a161a72-a8c1-e666-0ced-f1cb0507a37c@redhat.com>
MIME-Version: 1.0
X-Mimecast-Spam-Score: 0
X-Mimecast-MFC-PROC-ID: -Uh0x-rT88n_J6XRp2xWz_TEH2nX1wVe-fTzBASpEgA_1787678119
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset=US-ASCII
Sender: owner-sc22wg14@open-std.org
Precedence: bulk

On further investigation of issue 1024 (where I took an action to propose 
wording to disallow redeclarations of standard library typedefs, since we 
didn't want to allow them), it turned out that all wording needed to make 
such redeclarations of standard library typedefs into undefined behavior 
was already present.  Thus rather than proposing wording changes, I 
propose a response to the issue as follows that confirms the existing 
wording reflects the committee's intent.

### Suggested response

C23 6.4.3.1 (Identifiers: General) specifies that:

> If the program declares or defines an identifier in a context in
> which it is reserved (other than as allowed by 7.1.4), the behavior
> is undefined.

C23 7.1.3 (Reserved identifiers) says:

> * Each identifier with file scope listed in any of the following
>   subclauses (including the future library directions) is reserved
>   for use as a macro name and as an identifier with file scope in
>   the same name space if any of its associated headers is included.

C23 7.1.4 (Use of library functions) does not provide any exceptions
relevant to typedef names.

Thus, it is undefined behavior for an application to declare a
standard library typedef name with file scope in any translation unit
that includes the associated header.  The committee does not wish to
allow such redeclarations.

-- 
Joseph S. Myers
josmyers@redhat.com

