emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Silence two Clang warnings


From: Philipp Stephani
Subject: Re: Silence two Clang warnings
Date: Thu, 15 Jun 2017 19:23:06 +0000



Paul Eggert <address@hidden> schrieb am Do., 15. Juni 2017 um 20:56 Uhr:
On 06/15/2017 06:11 AM, Philipp Stephani wrote:
> Would you accept introducing pragmas to temporarily disable the
> warnings in Clang (#pragma clang diagnostic push/ignore/pop), with an
> explanation why they are false positives in these cases?

That depends on what the warnings are and how useful they are elsewhere.
These particular warnings do not seem to be useful for Emacs. For
example, it is common practice in Emacs's C macros to parenthesize
expressions to avoid operator-precedence confusion, and if Clang is
complaining about the "extra" parentheses in the preprocessor output
then that's clearly a warning that we should just shut off. Our goal is
clarity and reliability, not Clang pacification.


Given that that message only appears with CFLAGS=-save-temps, we probably don't need to disable it. With my usual configuration (--enable-gcc-warnings, CFLAGS='-O0 -ggdb3') there are no warnings. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]