[gnutls-devel] C99?

Nikos Mavrogiannopoulos n.mavrogiannopoulos at gmail.com
Thu Jul 28 11:21:08 CEST 2016


On Thu, Jul 28, 2016 at 10:06 AM, Tim Ruehsen <tim.ruehsen at gmx.de> wrote:
>> > > '_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.

Seems like a good idea. I've changed the error to warning and made a
merge request.

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

It's funny that C99 was always a considered a new thing as long as I
can remember. I think after 17 years is time to consider it something
old and support it by default :)

regards,
Nikos



More information about the Gnutls-devel mailing list