From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id EE1793854399 for ; Thu, 12 Jan 2023 16:05:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EE1793854399 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-ej1-x634.google.com with SMTP id ud5so45951251ejc.4 for ; Thu, 12 Jan 2023 08:05:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=8TGxbnFs8rdnLLElw1/nlrCaUxiXA4hhVCvJ1/RYkrE=; b=LFKf1ECc+dz2vVLatNDwU6d3c5kdDPxT4PYSWmHl24xVX8QvwAQ8/sLdJYPdMz/Nux 51fXQ3TSng1/Be+cM9lJxcFK74qtgtC92xc+LMf6bXuOdWUAofCX2WrW60vwQcRexc7/ jtKKRF4KfLJZa2vPz160IIqkr3qBO7brWFm+H0hvbKfQ4q9iT/esmiu5XE78y/D8DnAf IkOkmpTh3a+HjdUeql7oeZDsVz298Hu2wMXJ1+nlUYJ2221nxbO9YbcZkxSnDgpORzsW 5cabub1fFe+tyF9aq6GeNBph/ulaMdvieV8fsLtzEGzzmN6N5KBjtJ8b7r7lBhbK+swA iM5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=8TGxbnFs8rdnLLElw1/nlrCaUxiXA4hhVCvJ1/RYkrE=; b=Hxn+pDY+FgtPJq26iXcAN3n/etOA6YxTmvsA7A7hp8shDt9wMgW8desGrJdr3YG/ti QsNul5Ct9iCx7/Ccmp8bpO+lzK3yw88g7QXTVDsIMmhs1nPqggqOGN8AhEOr2AXCVxS+ +7EJ9wR1hJGivR1mHprN4ZqRMc3TIuIDRhMXoVtGGKFEZPqCcfUm3xJYq9tasgD0OSEU /xVX32xa1ahZKM1dNV0pYZjGmKx/IFebQMjeYWiSduKCeIABnGW5MZR4zRvrmLql34LP jrVogm6kSmOryhIRKjHpF6d7FYyaFeicoSJeCr7Y30ghmhhfoOnph0E7g+sY0/dE9d8D gM3A== X-Gm-Message-State: AFqh2kqcbuIYbaOKc/u/KYEOpVrGm+D12P8JmiQVOw72UCcNPcjuvTjJ Nww4xmF8+4HszCpp1W7QbcI= X-Google-Smtp-Source: AMrXdXtqGbS6peQhpi7+K0qplUfjiaSNnFMxo20RPTjJmlDeHsuBUK4RlVr2QRnkaqefft10rKwlUg== X-Received: by 2002:a17:906:b150:b0:7c1:2931:2263 with SMTP id bt16-20020a170906b15000b007c129312263mr68309711ejb.71.1673539548650; Thu, 12 Jan 2023 08:05:48 -0800 (PST) Received: from [0.0.0.0] ([2a05:f480:2400:16fb:5400:4ff:fe3c:2a4f]) by smtp.gmail.com with ESMTPSA id lb19-20020a170907785300b0084d1efe9af6sm7565495ejc.58.2023.01.12.08.05.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Jan 2023 08:05:48 -0800 (PST) Message-ID: Date: Fri, 13 Jan 2023 00:05:44 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH] libcpp: suppress builtin macro redefined warnings for __LINE__ To: Joseph Myers Cc: gcc-patches@gcc.gnu.org, sangyan@huawei.com References: <20221201043155.9369-1-luolongjuna@gmail.com> <8767c6bc-5b37-ca10-1176-e341081c555f@gmail.com> <587de9c9-e46f-b69e-84d8-7356a19db74@codesourcery.com> <6ac6c8e6-d18a-8aae-2ae3-ecdfed291755@codesourcery.com> From: Longjun Luo In-Reply-To: <6ac6c8e6-d18a-8aae-2ae3-ecdfed291755@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 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 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 12/2/2022 5:10 AM, Joseph Myers wrote: > 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. > Sorry for the delay. I have added a test case for this default situation. And also update another case to fully test the usage of builtin macros redefintions. >> 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. > Thanks for your patience.