[Top][All Lists]

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

bug#23640: 25.1.50; Getting rid of compiler warnings

From: Andy Moreton
Subject: bug#23640: 25.1.50; Getting rid of compiler warnings
Date: Thu, 02 Jun 2016 13:05:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (windows-nt)

On Wed 01 Jun 2016, Paul Eggert wrote:

> On 06/01/2016 01:37 PM, Richard Stallman wrote:
>> A macro UNUSED_LISP could handle the first.
> Yes, we could have separate macros for each data type requiring syntactically
> different initializers. Something like this, say:
>     int n UNUSED_0;
>     Lisp_Object obj UNUSED_Qnil;
> instead of the current:
>     int n IF_LINT (= 0);
>     Lisp_Object obj IF_LINT (= Qnil);
> We could easily change the code in that way. Is it worth the trouble?
>> What is the reason for writing IF_LINT (volatile)
>> instead of just volatile?
> Primarily, to tell the reader that the 'volatile' is not needed for
> correctness; it's present only to pacify a buggy compiler or lint checker. (In
> this case, it pacifies GCC; see GCC bug#54561.) It's basically the same reason
> the code uses 'IF_LINT (= 0)' rather than '= 0'.

Adding more macros that cruft up the source code to deal with a buggy
compiler warning is silly. If the warning is broken and does not
operate correctly, then do not enable that warning.


reply via email to

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