From owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org  Tue Aug 25 19:46:57 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 DCD6C356E57; Tue, 25 Aug 2026 19:46:57 +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 5D109356E40
	for <sc22wg14@open-std.org>; Tue, 25 Aug 2026 19:46:56 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1787680016;
	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=BvVco+AXJ5u3SGufkJbyZeAlCJKPEHwsAt9HVMObGuw=;
	b=hyl3F7jFzefc8qI5fOEJCKyRM9wlRPBtxCSCeUHqIPUB97qxivhVvuUGM8Qhh1iJs8lqDP
	7WZAqrVFUECUWI+qSt91YzPLIck12QFGGN3pC6pdddjGwowXRfVN82vLlgPisA5itjKOUc
	ULZQuy4b1+EuXtsbX1DYdDp7RQM7pqg=
Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com
 [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
 us-mta-628-MkR9utDTNEKMWJRGtdojlg-1; Tue, 25 Aug 2026 13:46:54 -0400
X-MC-Unique: MkR9utDTNEKMWJRGtdojlg-1
X-Mimecast-MFC-AGG-ID: MkR9utDTNEKMWJRGtdojlg_1787680013
Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-499cfd815f8so18872235e9.3
        for <sc22wg14@open-std.org>; Tue, 25 Aug 2026 10:46:54 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20251104; t=1787680013; x=1788284813;
        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=BvVco+AXJ5u3SGufkJbyZeAlCJKPEHwsAt9HVMObGuw=;
        b=syt7nSjmFr9geKBhzjZ1m/83+Mls3sTtlBsY/dmcxyboZp7TuJP7R7ueeYBbyJKllT
         WOk7QDIZjiTZoiT6otd7WKKOvmkPOZmOhgDeCNXSSbM2JddbLsOgnuMY0RvBccNaxnVl
         /FlUf4XGzOQ4eel3n04OffyEGDBAhKJMsR+juxWi+aEjbLhBxhC9Ka1lQQbKqmByycBR
         b+sFW2tE2y26m6qLao094PzGnETd6aV/yPAI8OC9HV4VZQ3HbLIH1BfgtyEejqykgWeD
         qhXieipOYT5btOFJYO3vDRs7QU+WPucy7r7fqBX9qQ3wsKmpHtYcmgOe+x0WHnaR/fhZ
         jtZQ==
X-Gm-Message-State: AFuF++kY+7iPHx+g13UvEPppAQnHgro3Dug6GNkhqZVHyat4NIdr6O4W
	mgWpL6RTfOo90CTg3cnqWcqS/8Iw7uNZuSzGjOJOQF5a6B6FiUdMMBnsFntCgJVPNJVgZRPrWB9
	GoZMTm6VMxLqwQO8ZmIx5qp5krBpGxTsxQpdwy8eg3L0k6GZezCHLV6mpiRjyx0rXC0AJpco2F3
	Aque7AUUTIVZn2HErargtdzGt/WsICJlt17AjVPHyT
X-Gm-Gg: AR+sD103T0k+NVwjafnnIpTjKIXDwFDuvuHzI5MeWGCRN04LHPW95QfFiYgwKQwkMnk
	yBrC/Loz/2/hb1d6M7lhi0pSpVYf3AsZdEeSrTYl8F5ZI2TzOHmok1Xrznvb8evLtlkdMPGzTKt
	UoBXUYzgNm7njskB+Lkuwl9yd78gVSJm9mzbgE95g/q6fviE6D8FsgjdNZ6+C1+uvIedwewQci2
	PYKMWfmszmTQjIgQjFevFlCdeNQ25nkGsasWRAs11aj6eGM3hIst0uzh21JzEEPBzs9FjIa1q3u
	wY/Sx1qq8+9Z+kYFrOO7OArO+RQgXxn2rPUKWPeHKXDP6N3HkVC3+sFnDaOYJJFjw4ZmpKdQDdT
	BzXF3SSMSxWl3mKt7oDlfcB0yxTRT0rE=
X-Received: by 2002:a05:600c:1e0a:b0:496:c18c:f9a3 with SMTP id 5b1f17b1804b1-499dc6eddf5mr8932665e9.5.1787680012999;
        Tue, 25 Aug 2026 10:46:52 -0700 (PDT)
X-Received: by 2002:a05:600c:1e0a:b0:496:c18c:f9a3 with SMTP id 5b1f17b1804b1-499dc6eddf5mr8932125e9.5.1787680012489;
        Tue, 25 Aug 2026 10:46:52 -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-499dca97883sm687405e9.6.2026.08.25.10.46.51
        for <sc22wg14@open-std.org>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Tue, 25 Aug 2026 10:46:52 -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 1wyvEZ-00000006YHg-1Obz
	for sc22wg14@open-std.org;
	Tue, 25 Aug 2026 17:46:51 +0000
Date: Tue, 25 Aug 2026 17:46:51 +0000 (UTC)
From: Joseph Myers <josmyers@redhat.com>
To: sc22wg14@open-std.org
Subject: Which standard library types can be array types (issue 1026)
Message-ID: <6a9e6876-8b59-4290-60e5-0cc8c500816e@redhat.com>
MIME-Version: 1.0
X-Mimecast-Spam-Score: 0
X-Mimecast-MFC-PROC-ID: e3ZJ2pQd8Pef3oHNqapEiABSEPxrkjVF8bxCLNxG25E_1787680013
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset=US-ASCII
Sender: owner-sc22wg14@open-std.org
Precedence: bulk

In discussion of issue 1026 (thrd_t as array type) in Ottawa it was 
suggested that the default for standard library types should be not 
allowing them to be array types, rather than excluding array types in 
particular places.

fpos_t and mbstate_t are explicitly excluded from being array types at 
present.  jmp_buf is required to be an array type.  We know that va_list 
needs to be permitted (but not required) to be an array type.

If we make the default that array types are not allowed, this would affect 
all of the following that don't currently say they are not array types:

  fenv_t femode_t fexcept_t va_list max_align_t FILE cnd_t thrd_t tss_t 
  mtx_t once_flag

  the atomic integer types in 7.17.6

For va_list we'd need to add explicit permission to be an array type.  
For thrd_t, changing it is the point of the issue.  I can't think that any 
of the atomic integer types in 7.17.6 is meant to be an array type, but 
strictly saying what representation and alignment requirements they have 
may not actually require them to be implemented in a way that excludes an 
array type.  (Lots of other types are explicitly described as integer 
types, real types, structure types, etc., which *does* prevent them from 
being array types.)

So should all of fenv_t femode_t fexcept_t va_list max_align_t FILE cnd_t 
tss_t mtx_t once_flag have wording added that says they may be array 
types?  If not, which should be permitted to be array types and which 
should not?  (tss_t is of particular interest here since various functions 
take a parameter declared as tss_t not tss_t*, so suggesting it was not 
anticipated to be an array type.)

If most of these should be allowed to be array types, when only fpos_t, 
mbstate_t, thrd_t, tss_t and the atomic integer types should be excluded, 
maybe it isn't such a good idea after all to make the default be to 
exclude array types?  (For the atomic integer types, maybe the right 
approach is to require them to be the same as the corresponding direct 
types rather than only having same representation and alignment.)

-- 
Joseph S. Myers
josmyers@redhat.com

