Re: How can Autoconf help with the transition to stricter compilation defaults?

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

 



On Tue, 15 Nov 2022, Sam James wrote:



On 13 Nov 2022, at 00:43, Paul Eggert <eggert@xxxxxxxxxxx> wrote:

On 2022-11-11 07:11, Aaron Ballman wrote:
We believe the runtime behavior is sufficiently dangerous to
warrant a conservative view that any call to a function will be a call
that gets executed at runtime, hence a definitive signature mismatch
is something we feel comfortable diagnosing (in some form) by default.

As long as these diagnostics by default do not cause the compiler to exit with nonzero status, we should be OK with Autoconf-generated 'configure' scripts. Although there will be problems with people who run "./configure CFLAGS='-Werror'", that sort of usage has always been problematic and unsupported by Autoconf, so we can simply continue to tell people "don't do that".


Is there somewhere in the autoconf docs we actually say this?

I've seen a few instances of folks adding it themselves very
early in their configure scripts (which is a pain for distros
anyway) which then ends up affecting the rest.

Autoconf can help with this issue due to GCC and some other compilers providing extensions (usually a pragma) to control warnings while compiling the C code. So configure can run without -Werror, but Autoconf could help by providing an easy way for enabling -Werror while compiling the application.

Of course the above does not require Autoconf since application developers can figure it out by themselves using preprocessor logic and knowledge of compiler-specific behavior.

If Autoconf is able to help, then the convoluted code can be in just one place (in Autoconf).

Bob
--
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux