public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Longjun Luo <luolongjuna@gmail.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, sangyan@huawei.com
Subject: Re: [PATCH] libcpp: suppress builtin macro redefined warnings for __LINE__
Date: Fri, 13 Jan 2023 00:05:44 +0800	[thread overview]
Message-ID: <fda29b5d-0b8f-0765-55da-8392f5dec030@gmail.com> (raw)
In-Reply-To: <6ac6c8e6-d18a-8aae-2ae3-ecdfed291755@codesourcery.com>

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.

      parent reply	other threads:[~2023-01-12 16:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01  4:31 Longjun Luo
2022-12-01 17:01 ` Joseph Myers
2022-12-01 18:23   ` Longjun Luo
2022-12-01 19:07     ` Joseph Myers
2022-12-01 19:51       ` Longjun Luo
2022-12-01 21:10         ` Joseph Myers
2023-01-12 16:02           ` Longjun Luo
2023-04-30 18:30             ` Jeff Law
2023-04-30 23:14               ` Jeff Law
2023-04-30 23:19                 ` Andrew Pinski
2023-01-12 16:05           ` Longjun Luo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fda29b5d-0b8f-0765-55da-8392f5dec030@gmail.com \
    --to=luolongjuna@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=sangyan@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).