From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 320F23858438 for ; Thu, 1 Dec 2022 17:01:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 320F23858438 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.96,209,1665475200"; d="scan'208";a="88173685" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 01 Dec 2022 09:01:26 -0800 IronPort-SDR: FlY7Vw4aPUMlXY5L+0uqhPvhCBTunwekRv6Tn1zzTLS9LiG/XPD+0nNQWVQt9nfKFeWF8131Og Rau8gUsurkXmheW8ojn0EyFVIlMFzph/ayrknv0Q4E+D9FpGLd20MevOewytwbO5Bkn3dPbthC 86klG/FC8wmXvpP07CQnQC7Gyem8IqcWpbO8bqDDau7FzqUZ8XmgL6OsgmfwBuHcqzO0C8MkyP L6cQgaLXz1KfN2AEeSiAjte9SXvkkWULYTJoIQ1CM5Rl5zpFOB30A2kOSEUaMmFaJjx1IJSMzO zn4= Date: Thu, 1 Dec 2022 17:01:20 +0000 From: Joseph Myers To: Longjun Luo CC: , Subject: Re: [PATCH] libcpp: suppress builtin macro redefined warnings for __LINE__ In-Reply-To: <20221201043155.9369-1-luolongjuna@gmail.com> Message-ID: References: <20221201043155.9369-1-luolongjuna@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3115.8 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,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 Thu, 1 Dec 2022, Longjun Luo via Gcc-patches wrote: > diff --git a/gcc/testsuite/gcc.dg/builtin-redefine.c b/gcc/testsuite/gcc.dg/builtin-redefine.c > index 882b2210992..9d5b42252ee 100644 > --- a/gcc/testsuite/gcc.dg/builtin-redefine.c > +++ b/gcc/testsuite/gcc.dg/builtin-redefine.c > @@ -71,7 +71,6 @@ > /* { dg-bogus "Expected built-in is not defined" "" { target *-*-* } .-1 } */ > #endif > > -#define __LINE__ 0 /* { dg-warning "-:\"__LINE__\" redef" } */ > #define __INCLUDE_LEVEL__ 0 /* { dg-warning "-:\"__INCLUDE_LEVEL__\" redef" } */ > #define __COUNTER__ 0 /* { dg-warning "-:\"__COUNTER__\" redef" } */ Is there some existing test that verifies that this redefinition is still diagnosed by default (in the absence of -Wno-builtin-macro-redefined)? -- Joseph S. Myers joseph@codesourcery.com