Re: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode

2018-12-30 Thread Niels Möller
Jeffrey Walton  writes:

> rsa-sign-tr.c: In function ‘sec_equal’:
> rsa-sign-tr.c:243:3: error: ‘for’ loop initial declarations are only
> allowed in C99 or C11 mode
>for (size_t i = 0; i < limbs; i++)
>^
> rsa-sign-tr.c:243:3: note: use option -std=c99, -std=gnu99, -std=c11
> or -std=gnu11 to compile your code

This has been fixed in
https://git.lysator.liu.se/nettle/nettle/commit/f5a3a224bf00bef5669366d2ae23c2b2b13b8016

Not sure if there will be a bug-fix release 3.4.2, before we get till
3.5.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs


error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode

2018-12-29 Thread Jeffrey Walton
Building on my HiKey, which is Aarch64.

==

$ gcc --version
gcc (Debian/Linaro 4.9.2-10+deb8u1) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

==

gcc -I. -I/usr/local/include -DNDEBUG -DHAVE_CONFIG_H -g2 -O2 -fPIC
-ggdb3 -Wno-pointer-sign -Wall -W   -Wmissing-prototypes
-Wmissing-declarations -Wstrict-prototypes   -Wpointer-arith
-Wbad-function-cast -Wnested-externs -fpic -MT rsa-sign-tr.o -MD -MP
-MF rsa-sign-tr.o.d -c rsa-sign-tr.c \
&& true
gcc -I. -I/usr/local/include -DNDEBUG -DHAVE_CONFIG_H -g2 -O2 -fPIC
-ggdb3 -Wno-pointer-sign -Wall -W   -Wmissing-prototypes
-Wmissing-declarations -Wstrict-prototypes   -Wpointer-arith
-Wbad-function-cast -Wnested-externs -fpic -MT rsa-verify.o -MD -MP
-MF rsa-verify.o.d -c rsa-verify.c \
&& true
rsa-sign-tr.c: In function ‘sec_equal’:
rsa-sign-tr.c:243:3: error: ‘for’ loop initial declarations are only
allowed in C99 or C11 mode
   for (size_t i = 0; i < limbs; i++)
   ^
rsa-sign-tr.c:243:3: note: use option -std=c99, -std=gnu99, -std=c11
or -std=gnu11 to compile your code
Makefile:260: recipe for target 'rsa-sign-tr.o' failed
make[1]: *** [rsa-sign-tr.o] Error 1
make[1]: *** Waiting for unfinished jobs
make[1]: Leaving directory '/home/build/nettle-3.4.1'
Makefile:49: recipe for target 'all' failed
make: *** [all] Error 2
___
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs