From owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org  Mon Aug 25 20:52:49 2025
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 D6A67356B69; Mon, 25 Aug 2025 20:52:49 +0200 (CEST)
Delivered-To: sc22wg14@open-std.org
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
	by www.open-std.org (Postfix) with ESMTP id 4AEB2356B38
	for <sc22wg14@open-std.org>; Mon, 25 Aug 2025 20:52:48 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1756147967;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references;
	bh=9KpOKVfpyuWdAlMuAAfJ0qXc/fdSJn6vSuZgJEROkAw=;
	b=bHFoDpOr1SdYkc6PfV8ecKm/2QmwqmdJw/Cc74IX66VUrfuE8B0qwMwgvB4Aw5+brb95qQ
	64VrnFeghfBix2fk3OUv20g8DA6Q6sUx4sxEA4mXRgEIuDyvF+1Xh24swmU2/sHtu+Kn9k
	xtDR4ss4mrpOB5c+CND+7D37kjJlUGE=
Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com
 [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
 us-mta-645-4P3eJyivMqS3lzyzPRU9bA-1; Mon, 25 Aug 2025 14:52:46 -0400
X-MC-Unique: 4P3eJyivMqS3lzyzPRU9bA-1
X-Mimecast-MFC-AGG-ID: 4P3eJyivMqS3lzyzPRU9bA_1756147965
Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-3c79f0a57ddso1188262f8f.1
        for <sc22wg14@open-std.org>; Mon, 25 Aug 2025 11:52:45 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1756147964; x=1756752764;
        h=mime-version:references:message-id:in-reply-to:subject:to:from:date
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
        bh=bgHWm3b4hXmjL4BUmjtdVli0XrKJ3mA2vUtMa4ZjTlg=;
        b=D40AJfpmpCEosMehQgpR5wVaGqOvLk/8CyE4PNCo8FwEduW6A3YQe8FJQKrG+lPuAc
         54FzHH8RpClzK39DMMaLLF4Er9OQ1Ho/LnWTeDXFqbL2YYEIybCzEs25ERB0yQ1T1O0I
         Z2gnwohikzVvgwCvzcHNkXfO6+Td7TFPLw6wcGx3gZcNy1P1A4nR+YUw26A1czTNe20N
         ugrSdISkMzwxi81w+vcjvXEKPY+4aOHRVrZDFkSXCcsnooZ8/OAdJnZLFjHeHWIDNRc7
         3yKQGYJOyet/gz657Pk1HCdDW+eRYLge3GdLZ8zOoxbucpK6TCyU5OtlSPnDiXaAQLWH
         GZjA==
X-Gm-Message-State: AOJu0Yw+5VslatbBTtYrriJWrO7IXtanAlnpSCm4KdgCMmJ7eLcCu9GW
	Nw5LiKJS7SHcTrTMlBSOsZPppulZSWsKgLPz4eZZKB8aich9YMo6ZrzTDrVlpHngjYGZlgtXvkK
	MPvfCdQ2yzrdkQ5LWlX0sh7iyO/Y+r3lNVpL1YE3dGLH64biLD90DHMO1GrsqFTOhLlOcePwboC
	CGOBQltVK1BJQH8upn0weQIvcBJMVBvxwiF8fkWBia
X-Gm-Gg: ASbGnctm41vl1EVP0GPi4228ByNX/G1lfFaJ+8RGYzjnbHVHyZMQtzg3Rni/uJ9zwe3
	TJvxm1YaZR7lE+fBCaATFanCsOHnyolBQxG85YE4xMCNpof/RxTJppVWP4iXdECJWiORXXd7PDW
	CoL4qRt+vyLVU4KcGDQ99W3OTRtmp/4+tgM5EML9hlaGjfU13U77pCCR93AztF853LHxD8GbOO6
	Fs4zb70XCzke6tq+HT/v81YLgn2lrz0faFlrWDkxdvJUfdcc+a1Nv3jlt6SekF+EHJKltEsmhBt
	iTIbWBpG3fOILA7HGqytLYgy6+WSboy3kumCl8tBLtKuQni4aVPx/0LpEpqKE8cudggy+P8xiNi
	0GRBVY9QHhYQTxZgVjkd/ubbauL+F63m3MKcWTpjAIzH92AZHHAB/O82WRIc=
X-Received: by 2002:a05:6000:23c5:b0:3ca:3b3f:ecb1 with SMTP id ffacd0b85a97d-3ca3b3ff3f3mr1613850f8f.41.1756147964303;
        Mon, 25 Aug 2025 11:52:44 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IGmmPaxi8vgkEm/JzqulcmE7DTJvNhBQ2mkaeGeybb0Y3NriIREy7Gy3ZFzWyGG8mo6UgipBQ==
X-Received: by 2002:a05:6000:23c5:b0:3ca:3b3f:ecb1 with SMTP id ffacd0b85a97d-3ca3b3ff3f3mr1613833f8f.41.1756147963712;
        Mon, 25 Aug 2025 11:52:43 -0700 (PDT)
Received: from digraph.polyomino.org.uk (2.3.3.e.b.b.1.5.0.0.0.0.0.0.0.0.7.f.3.9.3.7.f.b.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:bf73:93f7::51bb:e332])
        by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3c711ca623asm12550030f8f.59.2025.08.25.11.52.43
        for <sc22wg14@open-std.org>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Mon, 25 Aug 2025 11:52:43 -0700 (PDT)
Received: from jsm28 (helo=localhost)
	by digraph.polyomino.org.uk with local-esmtp (Exim 4.97)
	(envelope-from <josmyers@redhat.com>)
	id 1uqcJ7-00000000oek-29wo
	for sc22wg14@open-std.org;
	Mon, 25 Aug 2025 18:52:41 +0000
Date: Mon, 25 Aug 2025 18:52:41 +0000 (UTC)
From: Joseph Myers <josmyers@redhat.com>
To: sc22wg14@open-std.org
Subject: Re: [SC22WG14.29414] New issue #1001: Qualified rvalues from structure
 or union members
In-Reply-To: <20250306212422.D69093567F7@www.open-std.org>
Message-ID: <1702e282-4ca0-2f82-6cd0-4ba49e041be6@redhat.com>
References: <20250306212422.D69093567F7@www.open-std.org>
MIME-Version: 1.0
X-Mimecast-Spam-Score: 0
X-Mimecast-MFC-PROC-ID: 7URk8fpvroKNdobip6kLRGFMvzD7TsZMKzDRRd5CgGU_1756147965
X-Mimecast-Originator: redhat.com
Content-Type: multipart/mixed; boundary="-1152306461-1183719421-1756147961=:194532"
Sender: owner-sc22wg14@open-std.org
Precedence: bulk

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
---1152306461-1183719421-1756147961=:194532
Content-Type: text/plain; charset=ISO-8859-7
Content-Transfer-Encoding: 8BIT

On Thu, 6 Mar 2025, Joseph Myers wrote:

> ### Suggested correction
> 
> In C23 6.5.3.4 (Structure and union members), insert at the end of the
> first Semantics paragraph:
> 
> > <ins>If the first expression is not an lvalue and the designated
> > member does not have array type, the result has the unqualified,
> > non-atomic version of the type of the designated member.</ins>

I asked today not to vote on this because of interactions with the 
integration of N3517 (accepted in a remote vote; integrated in the 
standard draft sources in git more recently than the N3550 working draft).

I think there are two options for how to update the changes from this 
issue for N3517 (which we can consider further at the next meeting).  If 
we follow the approach in the Suggested correction, then in C2y an 
additional change is needed: in the wording added by N3517, change

  If E is an lvalue, the expression is an lvalue; otherwise, the 
  expression is not an lvalue and its type is the unqualified, non-atomic 
  version of the array¢s element type.

to

  If E is an lvalue, the expression is an lvalue; otherwise, the
  expression is not an lvalue.  If E is an lvalue or the array's element 
  type is an array type, the type of the expression is the array's element 
  type; otherwise, the type of the expression is the unqualified, 
  non-atomic version of the array¢s element type.

(This concerns the examples I gave in 
https://www.open-std.org/jtc1/sc22/wg14/29936 .)

On the other hand, if we decide to have strictly no qualified rvalues even 
when they are arrays and it is possible to construct lvalues from their 
elements, remove "and the designated member does not have array type" from 
the wording I proposed originally in the issue.

-- 
Joseph S. Myers
josmyers@redhat.com
---1152306461-1183719421-1756147961=:194532--

