From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id A24FD385783F for ; Sun, 30 Apr 2023 16:24:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A24FD385783F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-329673008e3so14869815ab.2 for ; Sun, 30 Apr 2023 09:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682871859; x=1685463859; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Ax/cgXyJgxxnXPDp+TIk0ECZvArzyAjQF5FTkc2ssY8=; b=HgBKzAGwgyrft8NnGJpkiRVIirn3pzltcIHFOedH+Lb9V418bx9ZybsP703mxEbxUD pQVSNWp587h4MQ8u/gwyMmFEFwZugcRZ3gR2pN8E2yMrVhmLiVUgri1o5gmUzduTZTXa /+FCo8zLqSAN/ZricMD/BFiNsAiCetomcPJ+7ObfNpIcv9P+0U9Pdp0AQzyhscLX7riA xNN1fydr4y865FeWqq5c2YDFyOeTVVCllm0IRlSmEG3i8PsMDl5T4Ogb+6E9vbmMAJy7 FOpOEkmVQkFf2GOsL3TIf7R5EgJFryKgID6O5BwuYL0VXj8blq4nop2EU8AoysByZ8gM GXlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682871859; x=1685463859; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ax/cgXyJgxxnXPDp+TIk0ECZvArzyAjQF5FTkc2ssY8=; b=C24tr6DrLjN3EIK3gxGIsMZjviphegty2sG7ppl3/wCk+F2EbhGAey3RmkE/RgKm/H tGjjWG95OBZukGvEAvwBHuiKX1/eJBI24pPAlY97uLhGuNwh7vkp0Ww5/EK8rcUhtJiD deZK2alT7uAa2RvGFu3dMxKnjLKKiAJOPC6t1adq6nrilbXFYleaMXJ3A5+bMDXjcXZg zDQJg69trFhkTjKLAPjul6f1YOXzqTdww4cdbaCZYYNg8QXGeoIMu4s4skj9q2NhrAJo yjddPIFgyzjsaSYBFDApYBg4rN91nHTq7VAlVbM+xgqUrl0a4jc9yYuKY45eZHQeJJzS Ehsg== X-Gm-Message-State: AC+VfDwa40L5KaHPKjzI8QmzZOgbRdAlkP9C0YOhbqz5z2naQI6XfLPK Rgv9HXKRjD73q9UAFyU3/fw= X-Google-Smtp-Source: ACHHUZ42rUkaRFCoOXRYXm1qvotSAn84afphPeQSCdkU1iRChVx09thIMJPHJq78qUIB4kPcdYoE/w== X-Received: by 2002:a92:cac8:0:b0:32b:26aa:ce3c with SMTP id m8-20020a92cac8000000b0032b26aace3cmr8822972ilq.10.1682871858758; Sun, 30 Apr 2023 09:24:18 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::99f? ([2601:681:8600:13d0::99f]) by smtp.gmail.com with ESMTPSA id p7-20020a92b307000000b00315327197d4sm6862102ilh.23.2023.04.30.09.24.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 Apr 2023 09:24:18 -0700 (PDT) Message-ID: <459b385d-3799-7482-a7ce-6c36952709f1@gmail.com> Date: Sun, 30 Apr 2023 10:24:17 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 2/2] Improve error message for excess elements in array initializer from {"a"} Content-Language: en-US To: apinski@marvell.com, gcc-patches@gcc.gnu.org References: <1669828695-18532-1-git-send-email-apinski@marvell.com> <1669828695-18532-2-git-send-email-apinski@marvell.com> From: Jeff Law In-Reply-To: <1669828695-18532-2-git-send-email-apinski@marvell.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 11/30/22 10:18, apinski--- via Gcc-patches wrote: > From: Andrew Pinski > > So char arrays are not the only type that be initialized from {"a"}. > We can have wchar_t (L"") and char16_t (u"") types too. So let's > print out the type of the array instead of just saying char. > > Note in the testsuite I used regex . to match '[' and ']' as > I could not figure out how many '\' I needed. > > OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. > > gcc/c/ChangeLog: > > * c-typeck.cc (process_init_element): Print out array type > for excessive elements. > > gcc/testsuite/ChangeLog: > > * gcc.dg/init-bad-1.c: Update error message. > * gcc.dg/init-bad-2.c: Likewise. > * gcc.dg/init-bad-3.c: Likewise. > * gcc.dg/init-excess-3.c: Likewise. > * gcc.dg/pr61096-1.c: Likewise. OK jeff