-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alessandro Vesely wrote:
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
FreeBSD 4.11 is EOL at the end of this month and FreeBSD 5+ all use
gcc 3 as the base compiler. But I'm not sure about the situation in
regards to other *BSD's and various Linux-distro's.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
iD8DBQFFs5vvVf373DysOTURArqYAJ46b+Gz0QT3wa/NHYkAuehw/qIBEACgkJfr
b+3GtRtYNfodZ5FEHTqvENo=
=8e0D
-----END PGP SIGNATURE-----