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 11:07:40 +0100
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

> +# gl_WARN_ADD([parameter]) adds parameter to WARN_CFLAGS if compiler
> +# supports it.  For example, use gl_WARN_ADD([-Werror]).
> +AC_DEFUN([gl_WARN_ADD],
> +[
> +  pushdef([param],[translit([$1],[ABCDEFGHIJKLMNOPQRSTUVWXYZ./-],
> +                                 [abcdefghijklmnopqrstuvwxyz___])])

There are m4sh macros AS_VAR_SET, AS_VAR_PUSH, AS_VAR_POP, AS_VAR_IF
that help doing this and support things like

for i in no-foo bar no-baz; do
  gl_WARN_ADD([-W$i])
done

I can do the change, or you can do it; as you prefer.  In any case if
you pushdef you'd better popdef too. :-)

Paolo




reply via email to

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