emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DEFU* macro name for a extern DEFUN: DEFUE? DEFUNEX?


From: Paul Eggert
Subject: Re: DEFU* macro name for a extern DEFUN: DEFUE? DEFUNEX?
Date: Sun, 10 Apr 2011 23:37:43 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9

On 04/10/2011 11:27 PM, Dan Nicolaescu wrote:

> Are you using gcc ?  If yes, and you are cleaning up the code to not
> generate warnings with some -W flags, how about adding those flags to
> the default set so that we do not regress?  (configure only sets very few -W
> flags now, it could set more...)

Sure, I can do that.  However, I'm using quite a few flags, and they
are likely to cause problems during a normal "configure; make" if
they're made the default.  Even if a maintainer does a clean build on
(say) RHEL 5.6 it's likely that there will be lots of annoying
warnings when an installer runs on (say) Solaris.  What I plan to do
is what other GNU packages do in this situation, namely, add an
--enable-gcc-warnings option to "configure".  The default is no
warnings, but if you set the configure-time option you get lots of
nice warnings.

> How about the more explicit DEFUN_EXTERN and document DEFUN as
> generating a static function?

Sure, that'd be easy.

>> +#define INFUN(fnname, maxargs) \
>> +  static Lisp_Object fnname DEFUN_ARGS_ ## maxargs
> 
> How about nothing instead of INFUN?
> Explicit prototypes are much easier to read, and easier to figure out
> the calling convention.

Yes, that'd also be easy.



reply via email to

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