From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by sourceware.org (Postfix) with ESMTPS id CA4053858D1E for ; Wed, 30 Nov 2022 23:17:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CA4053858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nefkom.net Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4NMw8r1prmz1r0FV; Thu, 1 Dec 2022 00:17:31 +0100 (CET) Received: from localhost (dynscan3.mnet-online.de [192.168.6.84]) by mail.m-online.net (Postfix) with ESMTP id 4NMw8q3bdfz1qqlR; Thu, 1 Dec 2022 00:17:31 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan3.mail.m-online.net [192.168.6.84]) (amavisd-new, port 10024) with ESMTP id h5uR2sq8sIq0; Thu, 1 Dec 2022 00:17:30 +0100 (CET) X-Auth-Info: W6ezKky/tx8XDgS7rQOwWIXoUe2CUE7FpAxWpAAQJkz5+lEQXV5Y35Hn7UChq9+n Received: from igel.home (aftr-82-135-86-96.dynamic.mnet-online.de [82.135.86.96]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 1 Dec 2022 00:17:30 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 74B5D2C328F; Thu, 1 Dec 2022 00:17:30 +0100 (CET) From: Andreas Schwab To: Segher Boessenkool 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"} References: <1669828695-18532-1-git-send-email-apinski@marvell.com> <1669828695-18532-2-git-send-email-apinski@marvell.com> <20221130230506.GS25951@gate.crashing.org> X-Yow: I know how to do SPECIAL EFFECTS!! Date: Thu, 01 Dec 2022 00:17:30 +0100 In-Reply-To: <20221130230506.GS25951@gate.crashing.org> (Segher Boessenkool's message of "Wed, 30 Nov 2022 17:05:06 -0600") Message-ID: <87edtk2fsl.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham 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 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\]' ...}. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."