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 #8 received at 23640 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: 23640 <at> debbugs.gnu.org
Subject: Re: bug#23640: 25.1.50; Getting rid of compiler warnings
Date: Sat, 28 May 2016 21:57:29 +0300
> From: Ken Brown <kbrown <at> cornell.edu>
> Date: Sat, 28 May 2016 14:40:36 -0400
> 
> Building master on Cygwin with gcc-5.3.0 yields many "control reaches
> end of non-void function" warnings.  What's the best way to get rid of
> these?  Should I add return statements that will never be reached, like
> this?
> 
> --- a/src/frame.c
> +++ b/src/frame.c
> @@ -263,6 +263,8 @@ See also `frame-live-p'.  */)
>         return Qns;
>       default:
>         emacs_abort ();
> +      /* Pacify compiler.  */
> +      return Qnil;
>       }
>   }

emacs_abort is declared with _Noreturn, so how come GCC doesn't shut
up about "unreachable" code?

FWIW, I'm building master with GCC 5.3.0, and don't see these
warnings.




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.