8 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Unable to build C...
FromSent OnAttachments
Sander HolthausJan 20, 2007 8:50 am 
Sam VarshavchikJan 20, 2007 9:03 am 
Sander HolthausJan 20, 2007 9:38 am 
Mike HorwathJan 20, 2007 9:56 am 
Mike HorwathJan 20, 2007 10:09 am 
Milan ObuchJan 20, 2007 10:54 am 
Alessandro VeselyJan 21, 2007 7:25 am 
Sander HolthausJan 21, 2007 8:59 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Unable to build Courier Authlib LDAP 0.59.1 on FreeBSD 4.11Actions...
From:Alessandro Vesely (ves@tana.it)
Date:Jan 21, 2007 7:25:54 am
List:net.sourceforge.lists.courier-users

Mike Horwath wrote:

On Sat, Jan 20, 2007 at 05:50:56PM +0100, Sander Holthaus wrote:

authldaplib.c: In function `l_get_values': authldaplib.c:137: syntax error before `char' authldaplib.c:139: `a' undeclared (first use in this function) [...]

Well, interesting.

Variables are being declared *after* intial function entrance and not part of a loop statement of some kind.

This will break a lot of compilers and is not ANSIC compliant if I remember my ANSIC.

No, C99 dropped that requirement and defines block items as declarations or statements without constraining their order.

6.8.2 Compound statement Syntax compound-statement: { block-item-list#opt } block-item-list: block-item block-item-list block-item block-item: declaration statement

That came after C++ and Java proved how functions are much more readable if variables are defined when they are used, possibly initializing them.

That breaks vanilla C compilers, though. Should we care?