Date: Fri, 01 May 2009 22:42:01 +0200 From: Christoph Mallon <christoph.mallon@gmx.de> To: Julian Elischer <julian@elischer.org> Cc: freebsd-hackers@freebsd.org, Zaphod Beeblebrox <zbeeble@gmail.com> Subject: Re: C99: Suggestions for style(9) Message-ID: <49FB5E99.5070004@gmx.de> In-Reply-To: <49FB5DB3.9030200@elischer.org> References: <49F4070C.2000108@gmx.de> <20090428114754.GB89235@server.vk2pj.dyndns.org> <20090430.090226.1569754707.imp@bsdimp.com> <49FA8D73.6040207@gmx.de> <49FAB322.9030103@elischer.org> <5f67a8c40905011324s2ad5e02dy47c73ae950845b54@mail.gmail.com> <49FB5C57.6050407@gmx.de> <49FB5DB3.9030200@elischer.org>
index | next in thread | previous in thread | raw e-mail
Julian Elischer schrieb:
> Christoph Mallon wrote:
>
>>
>> You are mistaken. Re-read the "if": It already contains a "return;" as
>> then-part. The declaration of "bp" has no relation to the "if".
>> In fact this is very good: "bp" can only be used after the "if",
>> because it is declared after it. Further, it most probably is only
>> assigned a value once, so declaration and the signle assignment are in
>> the same place, which aids readability and makes the code more concise.
>
> the fact that people misread it allows me to say
>
> "the defense rests m'lord"
Non sequitur. Warner wrote the "return;" in the same line as the if,
which easily hides it. If the "return;" wasn't there, the original
statement would be almost correct - actually it would be a compile
error, because if (x) int i; is not allowed[1].
Christoph
[1] if (x) { int i; } is allowed, of course.
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49FB5E99.5070004>
