all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Fkill_emacs NO_RETURN
Date: Sun, 09 Apr 2006 23:40:58 -0700	[thread overview]
Message-ID: <200604100640.k3A6ewE9011199@scanner2.ics.uci.edu> (raw)
In-Reply-To: <E1FSiPP-000769-Bn@fencepost.gnu.org> (Richard Stallman's message of "Sun, 09 Apr 2006 18:29:27 -0400")

Richard Stallman <rms@gnu.org> writes:

  > I deleted the NO_RETURN on Fkill_emacs,
  > because that was clearly the safest fix.
  > 
  > Another safe fix is to conditionalize the return statement with
  > #ifndef __GNUC__.  But I don't see a need to do so.  We should not
  > twist our code in knots just to satisfy a lint program.

Also consider just deleting the return statement. Why? 
 - gcc would not have a problem with that, it would not warn for a
   missing return for a NO_RETURN function.  
 - Other compilers might warn about it, but the warning would be
   incorrect anyway 

Marking functions NO_RETURN is desirable from a few points of view:
 -it helps gcc do a better job for the -Wuninitialized warning
 -it helps lint type tools, it will avoid analyzing the same code over
 and over when a new tool warns about it only to discover there's no
 problem. 
 -it helps code generation: for example by just marking
 `wrong_type_argument' as NO_RETURN the text size decreases from 
  1483168 bytes to 1474080 bytes (ie ~9KB) on my x86 system using
  gcc-4.1
 -gcc has a -Wmissing-noreturn flag that helps identify candidate
 functions. There are around 20 of them in emacs now. 

  reply	other threads:[~2006-04-10  6:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-09 18:40 Fkill_emacs NO_RETURN Eli Zaretskii
2006-04-09 19:13 ` Dan Nicolaescu
2006-04-10  3:27   ` Eli Zaretskii
2006-04-09 22:29 ` Richard Stallman
2006-04-10  6:40   ` Dan Nicolaescu [this message]
2006-04-10 18:25     ` Richard Stallman
2006-04-10 19:27       ` Dan Nicolaescu
2006-04-11  3:59         ` Richard Stallman
2006-04-10  0:35 ` Stefan Monnier
2006-04-10  3:33   ` Eli Zaretskii
2006-04-10  4:31     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200604100640.k3A6ewE9011199@scanner2.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.