Discussion:
Testing for unknown flags in different compilers (Paul Eggert)
David A. Wheeler
2014-03-06 20:38:24 UTC
Permalink
If Autoconf (or packages using it) engages a high warning level by default
I don't think anybody's advocating that. It'd be an option.
I am *NOT* advocating engaging a *high* warning level by default.
I *AM* advocating a *basic* warning level by default.
I interpret that on gcc to be "-Wall" or some variant.

One problem is that it's difficult to enable and control warning flags in general
in a compiler-independent way; Dale Visser's patch provides a mechanism
for doing that.
The typical practice is for packages to have a build-time option like
'./configure --enable-gcc-warnings' which some developers use but most
builders do not.
I agree, and I perceive that as a *problem*. We have a situation where
builders have little idea that the software they're building has a
host of likely problems.

Developers typically work primarily on stuff that's visible to
builders and true end-users. By making such problems more visible
to builders by default, they're more likely to get fixed.

--- David A. Wheeler
Paul Eggert
2014-03-06 21:26:43 UTC
Permalink
I*AM* advocating a*basic* warning level by default.
I interpret that on gcc to be "-Wall" or some variant.
-Wall generates too many false positives in practice. Perhaps some
variant would be better, but we'd have to see the details.

I doubt whether all developers will agree about this, so it'll be useful
to have an option that can be set in configure.ac. Packages whose
developers like the commonly-used './configure --enable-gcc-warnings'
approach could specify in configure.ac that warnings are off by
default. Packages whose developers like basic warnings (whatever they
are) enabled by default could do that too.

Loading...