From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eidolon.nox.tf (eidolon.nox.tf [IPv6:2a07:2ec0:2185::]) by sourceware.org (Postfix) with ESMTPS id 626A03858028 for ; Wed, 10 Mar 2021 01:46:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 626A03858028 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=diac24.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=equinox@diac24.net Received: from equinox by eidolon.nox.tf with local (Exim 4.94) (envelope-from ) id 1lJnvX-00G6im-Lr; Wed, 10 Mar 2021 02:46:20 +0100 Date: Wed, 10 Mar 2021 02:46:19 +0100 From: David Lamparter To: gcc-patches Subject: Re: [PATCH] c: don't drop typedef information in casts Message-ID: References: <20210310012815.3797974-1-equinox@diac24.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210310012815.3797974-1-equinox@diac24.net> X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2021 01:46:23 -0000 On Wed, Mar 10, 2021 at 02:28:15AM +0100, David Lamparter wrote: > The TYPE_MAIN_VARIANT() here was, for casts to a typedef'd type name, > resulting in all information about the typedef's involvement getting > lost. This drops necessary information for warnings and can make them > confusing or even misleading. It also makes specialized warnings for > unspecified-size system types (pid_t, uid_t, ...) impossible. I hope I didn't produce any glaring SNAFUs in submitting this patch, I haven't previously contributed to GCC. I've run the testsuite on x86_64 and seen no breakage from this. The delta (compared to this run: https://gcc.gnu.org/pipermail/gcc-testresults/2021-March/662078.html) is: $ diff -U0 /tmp/before.sum /tmp/after.sum --- /tmp/before.sum 2021-03-09 22:48:26.989146223 +0100 +++ /tmp/after.sum 2021-03-10 01:46:46.209935875 +0100 @@ -89 +89,2 @@ -FAIL: g++.old-deja/g++.other/virtual2.C -std=c++2a execution test +FAIL: g++.dg/modules/xtreme-header-5_c.C -std=c++17 (internal compiler error) +FAIL: g++.dg/modules/xtreme-header-5_c.C -std=c++17 (test for excess errors) None of which seems to be related to the patch. (The 2 new fails are "xtreme-header-5_c.C:3:30: internal compiler error: same canonical type node for different types 'void' and 'std::__void_t'") Cheers, David