[PATCH 2/2] configure.in: not all gccs support -Wno-pointer-sign
simon.mcvittie at collabora.co.uk
Mon Apr 20 02:21:35 PDT 2009
On Fri, 17 Apr 2009 at 22:44:13 +0200, Thiago Macieira wrote:
> Marc Mutz wrote:
> > # http://bugs.freedesktop.org/show_bug.cgi?id=19195
> This patch makes sense, thanks for doing it.
> Should we do it also for the other flags that we use?
Perhaps consider taking the TP_COMPILER_WARNINGS m4 from telepathy-glib? It
implements the following:
* a switch for -Werror by default or not (IMO this should be on by default,
except in release tags and tarballs where it should be off by default - in
telepathy-glib we use an optional fourth-level "nano version" to select
* --disable-Werror for people who auto-build random git snapshots (not
generally recommended, iirc this was for the benefit of OLPC/Sugar)
* a list of desirable warnings
* a list of undesirable warnings (unused-parameter and
missing-field-initializers, in our case)
All of the desirable warnings that are supported by the compiler are enabled;
all of the undesirable warnings are explicitly disabled; and -Werror is only
activated if for each foo in the undesirable list, -Wno-error=foo is supported.
This means that if the user explicitly uses CFLAGS=-Wall - which switches on
-Wunused-parameter and -Wmissing-field-initializers - those warnings are still
not considered to be an error. The Telepathy developers consider unused
callback parameters and implicit 0-initialization of partially initialized
structs to be C features, not bugs.
(Disclaimer: I wrote that macro, so it reflects my preference for how compiler
warnings should work.)
More information about the dbus