[PATCH 1/4] include: Add macro to ignore -Wuser-defined-warnings
Enze Li
enze.li@hotmail.com
Thu Sep 22 13:02:16 GMT 2022
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
More information about the Binutils
mailing list