The example:

@smallexample
gl_MANYWARN_ALL_GCC([warnings])
# Set up the list of the pointless, undesired warnings.
nw=
nw="$nw -Wsystem-headers"       # Don't let system headers trigger warnings
nw="$nw -Wundef"                # All compiler preprocessors support #if
UNDEF
nw="$nw -Wtraditional"          # All compilers nowadays support ANSI C
nw="$nw -Wconversion"           # These warnings usually don't point to
mistakes.
nw="$nw -Wsign-conversion"      # Likewise.
# Enable all GCC warnings not in this list.
gl_MANYWARN_COMPLEMENT([warnings], [$warnings], [$nw])
for w in $warnings; do
  gl_WARN_ADD([$w])
done
@end smallexample

now contains some warnings that are not used by default in any case,
specifically: -Wtraditional, -Wundef (though that is marked FIXME),
-Wconversion, -Wsign-conversion (also FIXME though).

I think leaving just -Wsystem-headers in the list would be fine, as it's a
good example where opinions differ on what's desirable, and is unlikely to
be added to the list of ignored warnings, while others come and go (easier
future maintenance of this example)!

-- 
https://rrt.sc3d.org

Reply via email to