Re: [MERGE] Further cleanup of urlAbsolute and friends.

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Fri, 05 Sep 2008 07:26:34 +0200

ons 2008-09-03 klockan 16:30 +1200 skrev Amos Jeffries:
> > Declaring variables as needed rather than in advance makes code
> > maintenance easier and might help the compiler to optimize. Not a big
> > deal though.
>
> But it does needlessly break the oldest-possible-compiler policy.

In Squid-2 the base language level is C89 (aka ANSI-C), which means that
variables must be declared at the start of a block {}.

Squid-3 uses C++ where variables may be declared inline where needed.
There is no supported C++ compiler requiring variables to be declared at
the beginning of a block like for Squid-2. But for code shared between
the two (and the C parts) it's good if this policy is still followed..

C99 inherits this language improvement from C++, but the old Visual
Studio compiler Guido uses does not support this..

Regards
Henrik
Received on Fri Sep 05 2008 - 05:27:01 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 05 2008 - 12:00:06 MDT