From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 683BA385840E for ; Mon, 24 Apr 2023 20:47:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 683BA385840E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.99,223,1677571200"; d="scan'208";a="3780662" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 24 Apr 2023 12:47:34 -0800 IronPort-SDR: xOKQy1YHMi9t74D9HGOlGoW4nu/jpTfVhyBHxNm3OfsFPzXdv7X9HEic5YSEP2+wpNB+3Xrayw beGYlrBFgs8z5F0qfKOLsJQvTfhcQoqkKI8KIdXP7yfY7dpS9PyEFMNcURZeGzx0QI7yR0HkAL XPkgKP2A2W9bZI1LtZdvvF7ZQgU0YLQHNY+8uXqxiLRlCX2+Zy1se7tesqU/y1TXWs57huBNLT J/LEkCcp8+inbVgEb8fO/PBYlqMu+BYfovzvIdd7ruZDNc2f+WmmDnseqPz1LQ8BNzCwuCmYet 1Cc= Date: Mon, 24 Apr 2023 20:47:30 +0000 From: Joseph Myers To: Jakub Jelinek CC: Marek Polacek , Subject: Re: [PATCH] c: Fix up error-recovery on functions initialized as variables [PR109412] In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3107.1 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Fri, 14 Apr 2023, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The change to allow empty initializers in C broke error-recovery on the > following testcase. We are emitting function %qD is initialized like a > variable error early; if the initializer is non-empty, we just emit > another error that the initializer is invalid. Previously if it was empty, > we'd emit another error that scalar is being initialized by empty > initializer (not really correct), but now we instead just try to > build_zero_cst for the FUNCTION_TYPE and ICE on it. > > The following patch just emits the same diagnostics for the empty > initializers as we emit for the non-empty ones. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK. -- Joseph S. Myers joseph@codesourcery.com