bug-gnulib
[Top][All Lists]
Advanced

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

Re: warning: module to simplify adding compiler warnings


From: Paolo Bonzini
Subject: Re: warning: module to simplify adding compiler warnings
Date: Tue, 11 Nov 2008 14:29:24 +0100
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Simon Josefsson wrote:
> Paolo Bonzini <address@hidden> writes:
> 
>>> But gl_WARN_INIT should also accept a VARIABLE argument, then? Or better,
>>> make gl_WARN_INIT automatic upon the first use of gl_WARN_ADD with the
>>> given VARIABLE?
>> You have a point; however, gl_WARN_INIT would then need a second
>> argument for the description too, and then the user can directly use
>> AC_ARG_VAR.
> 
> For that reason, I'd be in favor of requiring a gl_WARN_INIT for each
> variable used.  That might avoid strange effects due to typos too.

I'm not sure all users want to use AC_ARG_VAR for every warning
variable.  Actually, I don't see the point of using AC_ARG_VAR unless
the user can override the variable.  Something like

in gl_WARN_INIT:
  if test x${WARN_CFLAGS+set} = xset; then
    gl_overridden_WARN_CFLAGS=yes
  else
    gl_overridden_WARN_CFLAGS=no
  fi

in gl_WARN_ADD:
  do not add -W$1 to variable $2 if gl_overridden_$2=yes

Paolo




reply via email to

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