Re: Will autoconf work with -Werror=implicit-int and -Werror=implicit-function-declaration ?

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

 



On 12/11/23 08:24, Michael Orlitzky wrote:
I think the two fixes we're waiting for in the next release are,

   *https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=8b5e2016
   *https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=bf5a7595

The first commit is about -Wold-style-definition, a different matter.

-Wold-style-definition is tricky because it can diagnose code like this:

  int f () { return 2; }

This is old-style in C89 through C17 but is *not* old-style in C2x. Current 'gcc -std=c2x -Wold-style-definition' does not warn about it, even though 'gcc -std=c17 -Wold-style-definition' does warn.

As far as I know, the next Autoconf release should work with -Wold-style-definition, regardless of whether you're using C2x or an earlier C, so long as the earlier C is not so old that the compiler lacks -Wold-style-definition or equivalent (and yes, we still have some code for those ancient systems!).

However, this is even less important than working with -Wimplicit-int and -Wimplicit-function-declaration.


The real problem though is the thousands of existing configure.ac files
with their own buggy compile/link tests that will silently fail.

Quite true. It'd be unwise to configure a package with '-Werror=implicit-int' or -Werror=implicit-function-declaration' without a very careful look at all the configure.ac and .m4 and etc. files in that package.




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

  Powered by Linux