From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id B62BA3858D35 for ; Thu, 1 Dec 2022 21:10:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B62BA3858D35 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,210,1665475200"; d="scan'208";a="88326571" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 01 Dec 2022 13:10:49 -0800 IronPort-SDR: WaVAc0qWy3jr7nxs8SacSEsyHwE0vI4g3pVxVXXwnp9SrNgqZQNEiphhT+vd1mPcrvntfxSBKT cdnFO6BTo1dNyBXejDjipXDmXleIhI0hWBYz/tnihuVNfZpaW4tzfEhfzPm3ZGCop4pKv1jZyk 03UB4TNsFwpt2BidrjjmXV8wRUk3pFwathA+Ij0fBsuijmGDbnG6XmXNFv7fFhWixt5ioGIN2L kz3YcvwzLuOH4JOqk45EH9l1OKD+JKEGTNeO1PFL0DqGNkabgwE6gm6OrKHCaN5Xi8iXi3nWQY nzI= Date: Thu, 1 Dec 2022 21:10:44 +0000 From: Joseph Myers To: Longjun Luo CC: , Subject: Re: [PATCH] libcpp: suppress builtin macro redefined warnings for __LINE__ In-Reply-To: Message-ID: <6ac6c8e6-d18a-8aae-2ae3-ecdfed291755@codesourcery.com> References: <20221201043155.9369-1-luolongjuna@gmail.com> <8767c6bc-5b37-ca10-1176-e341081c555f@gmail.com> <587de9c9-e46f-b69e-84d8-7356a19db74@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3109.7 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP 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, 2 Dec 2022, Longjun Luo via Gcc-patches wrote: > They are ./gcc/testsuite/gcc.dg/cpp/warn-redefined.c and > ./gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c > > These two cases redefine the __TIME__ macro when using the option > '-Wbuiltin-macro-redefined'. > > I think I shoud add a test to verify __LINE__ macro in these two cases. I think it should be a test that doesn't use either -Wbuiltin-macro-redefined or -Wno-builtin-macro-redefined - a test of how the compiler behaves by default. > So, the patch itself has no problem. What I need do is to rich its test cases > and update change log, right? The patch needs review, but I'm fine with the principle that -Wno-builtin-macro-redefined should apply to __LINE__ as it does to various other built-in macros. -- Joseph S. Myers joseph@codesourcery.com