Re: malloca.c non-top variable declaration

2024-09-11 Thread Paul Eggert
On 2024-09-11 01:58, Bruno Haible wrote: 1) Gnulib makes use of C99 __VA_ARGS__ in a couple of places. I vaguely recall using other C99 features that can't easily be simulated or finessed by Gnulib. These include designated initializers, compound literals, and the subset of VLAs that are s

Re: malloca.c non-top variable declaration

2024-09-11 Thread Simon Josefsson via Gnulib discussion list
I agree in general, but I still find some value in supporting Debian Woody for Libidn and will keep it as a local gnulib patch. /Simon signature.asc Description: PGP signature

Re: malloca.c non-top variable declaration

2024-09-11 Thread Bruno Haible
Hi Simon, > There is no -Werror in use and the c99 module doesn't help So it has no way of supporting ISO C 99. > I think gnulib doesn't really support gcc 2.95 Indeed. gcc 2.95.3 is more than 23 years old [1]. The only sensible thing you can do with this compiler is to build a newer GCC, such

Re: malloca.c non-top variable declaration

2024-09-11 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > This is an instance of "declaration after statement", which is a feature of > C99, > which Gnulib routinely assumes nowadays. We document this since 2017-04-24 > [1]. > > I hope you aren't using -Werror, right? > > Does the compilation error go away if you add the 'c99' m

Re: malloca.c non-top variable declaration

2024-09-11 Thread Bruno Haible
Hi Simon, > I noticed a build failure of libidn on an old architecture that doesn't > permit non-top variable declarations. How about the patch below? The > rest builds fine and passes self-tests on the platform, so presumably > this was a recently introduced regression in malloca.c related to >