autoconf-patches
[Top][All Lists]
Advanced

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

=?UTF-8?Q?Re:=20Turn=20on=20compiler=20warnings=20by=20default=20for=20A


From: David A. Wheeler
Subject: =?UTF-8?Q?Re:=20Turn=20on=20compiler=20warnings=20by=20default=20for=20AC=5FPROG=5FCC, =20AC=5FPROG=5FCXX=09&=20AC=5FPROG=5FFC?=
Date: Fri, 07 Feb 2014 10:20:50 -0500 (EST)

On Tue, 14 Jan 2014 10:53:05 -0500, Dale Visser <address@hidden> wrote:
> One advantage of AC_FLAGS_WARN_ALL is that it has been written to work not
> only with gcc, but also with other compilers, such as clang and icc.

I think that's an awesome part of this approach.

> Also, it is possible to easily add flags in configure.ac using the provided
> AC_APPEND_FLAGS macro. For example, to specifically disable some warnings
> applicable to comment text:
> 
> AC_APPEND_FLAG([-Wno-comment], [CFLAGS])

I earlier replied to Dale Visser about this, but didn't reply to the whole list 
(sorry about that).

The AC_APPEND_FLAG doesn't provide the functionality I would want for 
portability,
because it doesn't really check if the flag works (and it doesn't report the 
checking either).
For example, if I add this:
AC_APPEND_FLAG([-Wno-such-option], [CFLAGS])
the "-Wno-such-option" is still passed to the compiler. Ugh.

Perhaps you could change its functionality, or create a separate macro with 
that functionality.
That way, you could enable/disable warnings on compilers that accepted the 
flag... and
still work on compilers that didn't support it.

Anyway, I think you're on the right path, just need some tweaks before it's 
ready.

--- David A. Wheeler



reply via email to

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