[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: Paul Eggert
Subject: bug#23640: 25.1.50; Getting rid of compiler warnings
Date: Wed, 1 Jun 2016 14:10:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

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'.

reply via email to

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