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

2022-11-10 Thread Zack Weinberg
On Thu, Nov 10, 2022, at 10:08 PM, Sam James wrote: >> On 10 Nov 2022, at 21:10, Michael Orlitzky wrote: >> While everyone else is discussing big ideas, it would be helpful for me >> personally if autoconf just made a release with the latest bugfixes. > > Before I dive into the rest of this

Re: Missing include in lib/autoconf/c.m4

2022-11-10 Thread Sam James
> On 11 Nov 2022, at 03:25, Zack Weinberg wrote: > > On Thu, Nov 10, 2022, at 10:18 PM, Sam James wrote: >>> On 5 Nov 2022, at 22:37, Sam James wrote: >>> >>> I would send a patch for the original issue but I'm wondering how to handle >>> freestanding (see big comment above

Re: Missing include in lib/autoconf/c.m4

2022-11-10 Thread Zack Weinberg
On Thu, Nov 10, 2022, at 10:18 PM, Sam James wrote: >> On 5 Nov 2022, at 22:37, Sam James wrote: >> >> I would send a patch for the original issue but I'm wondering how to handle >> freestanding (see big comment above _AC_C_C89_TEST_GLOBALS). Yeah, we can't include here, but it should be OK

Re: Missing include in lib/autoconf/c.m4

2022-11-10 Thread Sam James
> On 5 Nov 2022, at 22:37, Sam James wrote: > > > >> On 5 Nov 2022, at 05:07, Sam James wrote: >> >> Hello, >> >> When working on Clang 16 (and presumably GCC 14) porting [0], I noticed the >> following >> when building GNU grep 3.8: >> ``` >> configure:6215: checking for clang-16 option

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

2022-11-10 Thread Sam James
> On 10 Nov 2022, at 21:10, Michael Orlitzky wrote: > > On Thu, 2022-11-10 at 12:16 -0500, Zack Weinberg wrote: >> >> Nobody has a whole lot of time to work on Autoconf at present, but I >> would like to ask, anyway, what Autoconf could potentially do to make >> this transition easier. > >

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

2022-11-10 Thread Florian Weimer
* Rich Felker: > I've been writing/complaining about autoconf doing this wrong for > decades, with the best writeup around 9 years ago at > https://ewontfix.com/13/. Part of the reason is that this has bitten > musl libc users over and over again due to configure finding symbols > that were

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

2022-11-10 Thread Michael Orlitzky
On Thu, 2022-11-10 at 12:16 -0500, Zack Weinberg wrote: > > Nobody has a whole lot of time to work on Autoconf at present, but I > would like to ask, anyway, what Autoconf could potentially do to make > this transition easier. While everyone else is discussing big ideas, it would be helpful for

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

2022-11-10 Thread Paul Eggert
On 2022-11-10 10:19, Aaron Ballman wrote: In terms of the Clang side of things, I don't think we've formed any sort of official stance on how to handle that yet. It's UB (you can declare the C standard library interface without UB but calling any function with a mismatched signature is UB) The

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

2022-11-10 Thread Paul Eggert
On 2022-11-10 09:16, Zack Weinberg wrote: Changes to handle C23 built-in ‘bool’ better are under development but the design has not yet been finalized. [I'm cc'ing this to bug-gnulib too.] To my mind this is the biggest outstanding issue in Autoconf as far as C23 goes, as the upgrade path

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

2022-11-10 Thread Aaron Ballman
On Thu, Nov 10, 2022 at 12:16 PM Zack Weinberg via cfe-commits wrote: > > I’m the closest thing Autoconf has to a lead maintainer at present. > > It’s come to my attention (via https://lwn.net/Articles/913505/ and > https://fedoraproject.org/wiki/Changes/PortingToModernC) that GCC and > Clang

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

2022-11-10 Thread Jonathan Wakely
On Thu, 10 Nov 2022 at 17:58, Jonathan Wakely wrote: > > On Thu, 10 Nov 2022 at 17:52, Nick Bowler wrote: > > It saddens me to see so much breakage happening in "modern C", a > > language that has (until now) a long history of new language features > > being carefully introduced to avoid these

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

2022-11-10 Thread Rich Felker
On Thu, Nov 10, 2022 at 12:16:20PM -0500, Zack Weinberg wrote: > I’m the closest thing Autoconf has to a lead maintainer at present. > > It’s come to my attention (via https://lwn.net/Articles/913505/ and > https://fedoraproject.org/wiki/Changes/PortingToModernC) that GCC and > Clang both plan to

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

2022-11-10 Thread Aaron Ballman
On Thu, Nov 10, 2022 at 1:12 PM Jonathan Wakely via cfe-commits wrote: > > On Thu, 10 Nov 2022 at 17:58, Jonathan Wakely wrote: > > > > On Thu, 10 Nov 2022 at 17:52, Nick Bowler wrote: > > > It saddens me to see so much breakage happening in "modern C", a > > > language that has (until now) a

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

2022-11-10 Thread Jonathan Wakely
On Thu, 10 Nov 2022 at 17:52, Nick Bowler wrote: > It saddens me to see so much breakage happening in "modern C", a > language that has (until now) a long history of new language features > being carefully introduced to avoid these sort of problems. The features were introduced in 1999. Compilers

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

2022-11-10 Thread Bob Friesenhahn
On Thu, 10 Nov 2022, Zack Weinberg wrote: The biggest remaining (potential) problem, that I’m aware of, is that AC_CHECK_FUNC unconditionally declares the function we’re probing for as ‘char NAME (void)’, and asks the compiler to call it with no arguments, regardless of what its prototype

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

2022-11-10 Thread Florian Weimer
* Zack Weinberg via Gcc: > I’m the closest thing Autoconf has to a lead maintainer at present. > > It’s come to my attention (via https://lwn.net/Articles/913505/ and > https://fedoraproject.org/wiki/Changes/PortingToModernC) that GCC and > Clang both plan to disable several “legacy” C language

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

2022-11-10 Thread Nick Bowler
On 2022-11-10, Zack Weinberg wrote: > The biggest remaining (potential) problem, that I’m aware of, is that > AC_CHECK_FUNC unconditionally declares the function we’re probing for > as ‘char NAME (void)’, and asks the compiler to call it with no > arguments, regardless of what its prototype

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

2022-11-10 Thread Zack Weinberg
I’m the closest thing Autoconf has to a lead maintainer at present. It’s come to my attention (via https://lwn.net/Articles/913505/ and https://fedoraproject.org/wiki/Changes/PortingToModernC) that GCC and Clang both plan to disable several “legacy” C language features by default in a near-future

[committed] More fixes for compilers that reject K function definitions.

2022-11-10 Thread Zack Weinberg
This fixes all of the remaining failures exposed by running the testsuite with GCC 12 and CC='cc -Wimplicit-function-declaration -Wold-style-definition -Wimplicit-int -Werror' . * lib/autoconf/c.m4 (_AC_C_C89_TEST_GLOBALS): Don’t use K function definitions. * lib/autoconf/specific.m4