[gnutls-devel] C99?

Tim Ruehsen tim.ruehsen at gmx.de
Thu Jul 28 10:06:59 CEST 2016


On Thursday, July 28, 2016 5:36:35 AM CEST Eli Zaretskii wrote:
> > From: Nikos Mavrogiannopoulos <n.mavrogiannopoulos at gmail.com>
> > Date: Wed, 27 Jul 2016 23:39:51 +0200
> > 
> > > '_gnutls_name_constraints_intersect':
> > > ../../../lib/x509/name_constraints.c:241:2: error: 'for' loop initial
> > > declarations are only allowed in C99 or C11 mode
> > >   for (int type = 1; type <= GNUTLS_SAN_MAX; type++) {
> > >   ^
> > > ../../../lib/x509/name_constraints.c:241:2: note: use option
> > > -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
> > > Makefile:1438: recipe for target 'name_constraints.lo' failed
> > 
> > Thanks, I didn't know that gcc4 choked on it. I would expect any
> > compiler to understand c99 today.
> 
> It does, but only if you say -std=gnu99 or -std=c99.  The default in
> GCC 4 is still C90.

IMO, C99 is a good thing that the project should move forward to.

Here is a patch to require a C99 supporting compiler.
For e.g. GCC 4, -std=gnu99 is automatically added to the CFLAGS with this 
patch, so that simply works.

You could consider to change the AC_ERROR into a warning and try to continue.

But anyways, be prepared to get rants from people who try to keep ultra-aged 
systems with just GnuTLS enforced to the latest version ;-)

Regards, Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Require-compiler-to-support-C99.patch
Type: text/x-patch
Size: 658 bytes
Desc: not available
URL: </pipermail/attachments/20160728/d992da55/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20160728/d992da55/attachment.sig>


More information about the Gnutls-devel mailing list