From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 1F1D03858D37 for ; Wed, 30 Nov 2022 23:32:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1F1D03858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 2AUNVECf017763; Wed, 30 Nov 2022 17:31:14 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 2AUNVDOX017762; Wed, 30 Nov 2022 17:31:13 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 30 Nov 2022 17:31:13 -0600 From: Segher Boessenkool To: Andreas Schwab Cc: apinski@marvell.com, gcc-patches@gcc.gnu.org Subject: Re: [PATCH 2/2] Improve error message for excess elements in array initializer from {"a"} Message-ID: <20221130233113.GU25951@gate.crashing.org> References: <1669828695-18532-1-git-send-email-apinski@marvell.com> <1669828695-18532-2-git-send-email-apinski@marvell.com> <20221130230506.GS25951@gate.crashing.org> <87edtk2fsl.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87edtk2fsl.fsf@igel.home> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Dec 01, 2022 at 12:17:30AM +0100, Andreas Schwab wrote: > On Nov 30 2022, Segher Boessenkool wrote: > > > char u[1] = { "x", "x" }; /* { dg-error {excess elements in 'char[1]' initializer} } */ > > That won't work, as '[1]' is a bracket expression only matching '1'. > You'll need {... 'char\[1\]' ...}. Heh. Yeah, char\[1]. Sorry. Segher