[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fkill_emacs NO_RETURN
From: |
Dan Nicolaescu |
Subject: |
Re: Fkill_emacs NO_RETURN |
Date: |
Sun, 09 Apr 2006 23:40:58 -0700 |
Richard Stallman <address@hidden> 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.
Re: Fkill_emacs NO_RETURN, Stefan Monnier, 2006/04/09