Re: [PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above).

2020-08-05 Thread Vincent Lefevre
On 2020-08-05 10:58:29 -0700, Paul Eggert wrote: > On 8/5/20 10:32 AM, Vincent Lefevre wrote: > > With MPFR, it works after applying this patch. > > I don't see it as working with MPFR. If you try to build MPFR 4.1.0 with > "./configure CFLAGS='-g3 -O2 -Werror=old-style-definition'", then >

Re: [PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above).

2020-08-05 Thread Paul Eggert
On 8/5/20 10:32 AM, Vincent Lefevre wrote: With MPFR, it works after applying this patch. I don't see it as working with MPFR. If you try to build MPFR 4.1.0 with "./configure CFLAGS='-g3 -O2 -Werror=old-style-definition'", then 'configure' makes some other wrong decisions on my platform

Re: [PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above).

2020-08-05 Thread Joseph Myers
On Wed, 5 Aug 2020, Zack Weinberg wrote: > +1 from me regardless -- we should be phasing out the use of pre-ANSI > constructs in autoconf's generated C snippets, and this is as good a > place to start as any. Note that C2x no longer had old-style function definitions and treats () in a function

Re: [PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above).

2020-08-05 Thread Zack Weinberg
On Wed, Aug 5, 2020 at 1:32 PM Vincent Lefevre wrote: > > On 2020-08-05 07:24:38 -0700, Paul Eggert wrote: > > On 8/5/20 3:59 AM, Vincent Lefevre wrote: > > > This allows one to avoid a failure with AC_COMPUTE_INT when using > > > the -Werror=old-style-definition GCC option. > > > > Why is this

Re: [PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above).

2020-08-05 Thread Vincent Lefevre
On 2020-08-05 07:24:38 -0700, Paul Eggert wrote: > On 8/5/20 3:59 AM, Vincent Lefevre wrote: > > This allows one to avoid a failure with AC_COMPUTE_INT when using > > the -Werror=old-style-definition GCC option. > > Why is this needed? Telling 'configure' to use -Werror has never worked, for >

Re: [PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above).

2020-08-05 Thread Eric Blake
On 8/5/20 9:24 AM, Paul Eggert wrote: On 8/5/20 3:59 AM, Vincent Lefevre wrote: This allows one to avoid a failure with AC_COMPUTE_INT when using the -Werror=old-style-definition GCC option. Why is this needed? Telling 'configure' to use -Werror has never worked, for lots of other reasons.

Re: [PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above).

2020-08-05 Thread Paul Eggert
On 8/5/20 3:59 AM, Vincent Lefevre wrote: This allows one to avoid a failure with AC_COMPUTE_INT when using the -Werror=old-style-definition GCC option. Why is this needed? Telling 'configure' to use -Werror has never worked, for lots of other reasons.

[PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above).

2020-08-05 Thread Vincent Lefevre
This allows one to avoid a failure with AC_COMPUTE_INT when using the -Werror=old-style-definition GCC option. * lib/autoconf/c.m4 (AC_LANG_INT_SAVE): In function declarators, use "(void)" instead of "()". Signed-off-by: Vincent Lefevre --- lib/autoconf/c.m4 | 4 ++-- 1 file changed, 2