From: Enze Li <enze.li@hotmail.com>
To: Nick Clifton <nickc@redhat.com>
Cc: Tsukasa OI <research_trasio@irq.a4lg.com>,
Pedro Alves <pedro@palves.net>,
Joel Brobecker <brobecker@adacore.com>,
Enze Li <lienze@sourceware.org>,
binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/4] include: Add macro to ignore -Wuser-defined-warnings
Date: Thu, 22 Sep 2022 21:02:16 +0800 [thread overview]
Message-ID: <OS3P286MB2152712090CCDAAD09DFFD45F04E9@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <5333c388-9fc9-1a45-01da-835ad81541cc@redhat.com> (Nick Clifton's message of "Tue, 20 Sep 2022 17:36:05 +0100")
Hi Nick,
On Tue, Sep 20 2022 at 05:36:05 PM +0100, Nick Clifton wrote:
> Hi Tsukasa,
>
>> +# if __has_warning ("-Wuser-defined-warnings")
>
> I have not seen __has_warning () before. Is this a new feature of
> recent GCCs and Clang, or am I just behind the times ?
>
> Cheers
> Nick
I happen to know some info about this function-like macro. It was first
introduced in 2011. AFAIK, it is only supported by clang.
More detail, see here[1] for docs and here[2] for implement.
[1] https://clang.llvm.org/docs/LanguageExtensions.html#has-warning
[2] https://github.com/llvm/llvm-project/commit/a35d67dfd927191a16cf24931981d79901938381
Thanks,
Enze
next prev parent reply other threads:[~2022-09-22 13:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 3:10 [PATCH 0/4] gdb: (includes PR28413), Suppress some general warnings if built with Clang Tsukasa OI
2022-09-15 3:10 ` [PATCH 1/4] include: Add macro to ignore -Wuser-defined-warnings Tsukasa OI
2022-09-20 16:36 ` Nick Clifton
2022-09-22 13:02 ` Enze Li [this message]
2022-09-15 3:10 ` [PATCH 2/4] include: Add macro to ignore -Wunused-but-set-variable Tsukasa OI
2022-09-15 3:10 ` [PATCH 3/4] gdb/unittests: PR28413, suppress warnings generated by Gnulib Tsukasa OI
2022-09-15 3:10 ` [PATCH 4/4] gdb: Suppress "unused" variable warning on Clang Tsukasa OI
2022-09-22 8:25 ` [PATCH v2 0/4] gdb: (includes PR28413), Suppress some general warnings if built with Clang Tsukasa OI
2022-09-22 8:25 ` [PATCH v2 1/4] include: Add macro to ignore -Wuser-defined-warnings Tsukasa OI
2022-09-22 11:26 ` Nick Clifton
2022-09-22 8:25 ` [PATCH v2 2/4] include: Add macro to ignore -Wunused-but-set-variable Tsukasa OI
2022-09-22 11:27 ` Nick Clifton
2022-09-22 8:25 ` [PATCH v2 3/4] gdb/unittests: PR28413, suppress warnings generated by Gnulib Tsukasa OI
2022-10-18 13:44 ` Enze Li
2022-10-18 16:14 ` Tsukasa OI
2022-09-22 8:25 ` [PATCH v2 4/4] gdb: Suppress "unused" variable warning on Clang Tsukasa OI
2022-10-12 17:36 ` Simon Marchi
2022-10-16 13:37 ` Tsukasa OI
2022-10-17 12:35 ` Simon Marchi
2022-10-18 17:11 ` [PATCH v3] gdb/unittests: PR28413, suppress warnings generated by Gnulib Tsukasa OI
2022-11-14 14:02 ` Simon Marchi
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=OS3P286MB2152712090CCDAAD09DFFD45F04E9@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM \
--to=enze.li@hotmail.com \
--cc=binutils@sourceware.org \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=lienze@sourceware.org \
--cc=nickc@redhat.com \
--cc=pedro@palves.net \
--cc=research_trasio@irq.a4lg.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).