GNU bug report logs - #23640
25.1.50; Getting rid of compiler warnings

Previous Next

Package: emacs;

Reported by: Ken Brown <kbrown <at> cornell.edu>

Date: Sat, 28 May 2016 18:41:02 UTC

Severity: normal

Found in version 25.1.50

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 23640 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 23640 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>,
 Andy Moreton <andrewjmoreton <at> gmail.com>
Subject: Re: bug#23640: 25.1.50; Getting rid of compiler warnings
Date: Mon, 30 May 2016 10:41:55 -0400
On 5/30/2016 7:39 AM, Ken Brown wrote:
> On 5/29/2016 6:43 PM, Ken Brown wrote:
>> On 5/28/2016 5:47 PM, Ken Brown wrote:
>>> On 5/28/2016 2:57 PM, Eli Zaretskii wrote:
>>>> emacs_abort is declared with _Noreturn, so how come GCC doesn't shut
>>>> up about "unreachable" code?
>>>
>>> It looks like the problem is the definition of _Noreturn as a macro in
>>> config.h.  I'll have to figure out what's going on.
>>
>> That guess was wrong.  The problem turns out to be that lint is defined
>> in config.h.  When lint is defined, Cygwin's <sys/cdefs.h> defines
>> _Noreturn to be a macro with empty expansion.  I've raised the question
>> on the Cygwin list
>> (https://www.cygwin.com/ml/cygwin/2016-05/msg00374.html) as to whether
>> that's a bug.
>
> The answer is that the Cygwin's <sys/cdefs.h> is taken from FreeBSD, so
> the problem will exist there too.  (I just checked the FreeBSD git repo
> and confirmed that the code in question is still there.)  So it looks
> like defining lint should be disabled on Cygwin and FreeBSD, at least.
> Or maybe it should only be enabled on platforms where it's known that it
> doesn't cause problems.
>
> Paul, you're the one who introduced this.  What do you think?

Another glitch: Removing the line in configure.ac that defines lint 
results in lots of 'may be used uninitialized' warnings.  That's because 
the IF_LINT macro now suppresses all the initializations that were 
previously added to avoid these warnings.

Question: Why bother with IF_LINT at all?  Why not just unconditionally 
initialize the variables that gcc complains about?

Ken





This bug report was last modified 8 years and 349 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.