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: Bruno Haible
Subject: Re: warning: module to simplify adding compiler warnings
Date: Tue, 11 Nov 2008 00:15:49 +0100
User-agent: KMail/1.5.4

Simon Josefsson wrote:
> It allows me to add to configure.ac this:
> 
> gl_WARN_ADD([-Wall])
> gl_WARN_ADD([-Wpointer-arith])
> gl_WARN_ADD([-Wstrict-prototypes])
> gl_WARN_ADD([-Wno-pointer-sign])

Will $WARN_CFLAGS be used before or after $CFLAGS? I.e. can the user
disable these warning flags or not?

> gl_WARN_ADD([-Werror])

This is a bad idea. It will cause gratuitous frustration for users on
platforms that you haven't tested. Remember that many warnings do not
indicate something really wrong with the program, only the _possibility_
that something is wrong. The user will then need two attempts to build a
package, instead of only one. Or he will choose to build with a proprietary
compiler rather than with gcc.

IMO this is just the opposite of portability.

It would be better to make the macro bail out at autoconf time if someone
attempts to put gl_WARN_ADD([-Werror]) into his configure.ac file.

Bruno





reply via email to

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