From owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org  Thu Sep 25 20:11:01 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 8E67C356C5D; Thu, 25 Sep 2025 20:11:01 +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 2636F356BCF
	for <sc22wg14@open-std.org>; Thu, 25 Sep 2025 20:11:00 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1758823859;
	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=1AZX69QOqeotQedcFIQRoPqnd8NVLvKoAn6NuccbKNU=;
	b=UxyBUe6BMSvF4WzWvsPmlWVYtHat1A4lBCibHMh2wB3PJD3icjg6omPZRxvU7aki/uWyuD
	Ar0/itqdN8/BVmZxI2y8yWePBGuW5sPLFO9gnrC/1Fexp4lqTYiluPrGZiQXDtxeQk9Jo8
	+Pm4dljWC25vvi9XuXsZT3kexHeJXhw=
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-507-6Bxe6yduPdyQi7sFNVzeNw-1; Thu, 25 Sep 2025 14:10:57 -0400
X-MC-Unique: 6Bxe6yduPdyQi7sFNVzeNw-1
X-Mimecast-MFC-AGG-ID: 6Bxe6yduPdyQi7sFNVzeNw_1758823856
Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-46e303235e8so9306005e9.1
        for <sc22wg14@open-std.org>; Thu, 25 Sep 2025 11:10:57 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1758823856; x=1759428656;
        h=mime-version:message-id:subject:to:from:date:x-gm-message-state
         :from:to:cc:subject:date:message-id:reply-to;
        bh=1AZX69QOqeotQedcFIQRoPqnd8NVLvKoAn6NuccbKNU=;
        b=WmcD1luiObBjkTQdieFcC1uPFDxhY25v0P1Z355c8hcmtHPIeN9WKbsN0vOEMOnNTq
         pH6ItEnpMzKREMa58ki+hX8v7ZcNJmBh2cqIziALS7jcvVbBbH/wJdfH79nogg4EH0cb
         ScTKlidB47Pvqfl7/OYaVh64whEX3KYcDr96Bit92EBsyvvWqgI0aSmt/gEjIRgOERGB
         E9N3TKTwgusNyfrALOqJzDZ+ay+W6vweb5AgrE6u4i6AVuu2rMvm4FpDCBq8BS0F6brp
         tZkiavcCqbuTAVls+V3I+597K2tjMq3mhtJ5+BCUv/a7KcEYBvLmGqk36JukCvs/NF2Q
         3/DA==
X-Gm-Message-State: AOJu0YzgijUDEFkLGYznL6CKmLepgZaBxt3CIEIRCpZ8tsdZPGGD7ZGb
	XSAO09EvDM3N3UcQrQ+2Fwj3H91WK5cIUgBO12eGk8umvHFZjHhH54rMJvMAnRCdYbDOXVVBQKo
	CtB0HFDBxGq12JWdTWmZNLbuB3xsKFDBDQblGj4hISUxZN4h2/asz0FHwg1SAi3vUE3NJYw03uz
	mccFLTCskcdy83njYZctsBUpzUtFdRXpP3OeJBxrsy
X-Gm-Gg: ASbGnctG0M72Xa+op3hctONvMOgS9TuNViG/KU5y5OjAUyUpABBOvBWE4LpEM3n+Bm9
	DuLUsCT6lhwhPIVHoHFMkx459OmKa8ZuBBTr0NlaLakpDSydJoGNkzp3YK2CfGWpSQFH06bwPzf
	LOtxZg4wflaoZCgHXB6WYO+57qxzlkFWZpTUTGFfagsvGkmPBztcfXYDbzrowT8K54mLO+D+M6z
	l5vYLPFJTJW6CDncKKSP9ULbjpaS+/+FwKTu9uHhIxunLrTa3MUn9Gc46Mnei6sAEzlrC29TtEk
	ie4kOrGeu8zS8861cD8yMx+2Q+Nqh7/ykpTL3pK7HC3/vsiL1IxKG0Inl3AeXeNYbJanHZU=
X-Received: by 2002:a05:6000:2410:b0:3ee:13ba:e133 with SMTP id ffacd0b85a97d-40e4354d631mr4250498f8f.1.1758823855977;
        Thu, 25 Sep 2025 11:10:55 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFenugfTUkkmeiFwdAIQKMgBU5UUiMNuDbCYGhhnJM25/KJvTtmQs6nMMxOztXDRMOiyagYuA==
X-Received: by 2002:a05:6000:2410:b0:3ee:13ba:e133 with SMTP id ffacd0b85a97d-40e4354d631mr4250475f8f.1.1758823855504;
        Thu, 25 Sep 2025 11:10:55 -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 ffacd0b85a97d-40fc8aa0078sm3740871f8f.59.2025.09.25.11.10.54
        for <sc22wg14@open-std.org>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 25 Sep 2025 11:10:54 -0700 (PDT)
Received: from jsm28 (helo=localhost)
	by digraph.polyomino.org.uk with local-esmtp (Exim 4.97)
	(envelope-from <josmyers@redhat.com>)
	id 1v1qQe-00000000VyI-1gpR
	for sc22wg14@open-std.org;
	Thu, 25 Sep 2025 18:10:52 +0000
Date: Thu, 25 Sep 2025 18:10:52 +0000 (UTC)
From: Joseph Myers <josmyers@redhat.com>
To: sc22wg14@open-std.org
Subject: Braced scalar initializer with trailing comma
Message-ID: <cdb4d13c-f838-d898-82bd-bbd418b61728@redhat.com>
MIME-Version: 1.0
X-Mimecast-Spam-Score: 0
X-Mimecast-MFC-PROC-ID: CO9wlJKBa2gS2ZZsacz2OZtOEHjYZkJGsTbPsD-70TA_1758823856
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset=US-ASCII
Sender: owner-sc22wg14@open-std.org
Precedence: bulk

Is the following meant to be valid (note the trailing comma in the 
initializer)?

  int i = { 1, };

The relevant standard wording is "The initializer for a scalar shall be a 
single expression, optionally enclosed in braces, or it shall be an empty 
initializer.".  Since we adopted N3346 in Minneapolis, that has become a 
Constraint.  That wording doesn't say that the single braced expression 
might have a trailing comma inside braces - so is this meant to be 
rejected, or is "optionally enclosed in braces" meant to encompass also 
possibly having that trailing comma that's allowed in the syntax for a 
braced initializer?

-- 
Joseph S. Myers
josmyers@redhat.com

