From marc.glisse at inria.fr Tue Apr 1 15:30:53 2025 From: marc.glisse at inria.fr (Marc Glisse) Date: Tue, 1 Apr 2025 15:30:53 +0200 (CEST) Subject: [PATCH] acinclude.m4: Add parameter names in prototype for g(). In-Reply-To: <20250315165840.2519326-1-raj.khem@gmail.com> References: <20250315165840.2519326-1-raj.khem@gmail.com> Message-ID: <41b67e80-7012-2730-96b9-5d19ab816903@inria.fr> Done. Thanks, and sorry for breaking it. -- Marc Glisse On Sat, 15 Mar 2025, Khem Raj wrote: > This allows it to compile with older gcc e.g. gcc-10 > which does not have allow parameter name omission, it results > in > > a.c: In function ?g?: > a.c:3:8: error: parameter name omitted > 3 | void g(int,t1 const*,t1,t2,t1 const*,int){} > | ^~~ > > this was added to gcc via [1] thats why it is supported in > newer gcc. > > Adding the parameter names make it compatible with > old and new gcc > > [1] https://gcc.gnu.org/pipermail/gcc-cvs/2020-October/336068.html > > Signed-off-by: Khem Raj > --- > ChangeLog > > 2025-03-15 Khem Raj > > * acinclude.m4: Add parameter names to function prototype. > > acinclude.m4 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/acinclude.m4 b/acinclude.m4 > index 4fca12de2..b9d1eacfe 100644 > --- a/acinclude.m4 > +++ b/acinclude.m4 > @@ -609,7 +609,7 @@ GMP_PROG_CC_WORKS_PART([$1], [long long reliability test 1], > > #if defined (__GNUC__) && ! defined (__cplusplus) > typedef unsigned long long t1;typedef t1*t2; > -void g(int,t1 const*,t1,t2,t1 const*,int){} > +void g(int a,t1 const* b,t1 c,t2 d,t1 const* e,int f){} > void h(){} > static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) > {t1 c,x,r;int i;if(v0){c=1;for(i=1;i _______________________________________________ > gmp-devel mailing list > gmp-devel at gmplib.org > https://gmplib.org/mailman/listinfo/gmp-devel