[Bf-committers] Style issue

Alexander Ewering blender at instinctive.de
Fri Apr 14 22:06:37 CEST 2006


On Fri, 14 Apr 2006, Ed Halley wrote:

>
>
> Martin Poirier wrote:
>> Unless you can be 100% sure all compiler garranty (or
>> turn off) short circuit evaluation, the execution of
>> your expression is undefined.
>
> Er, find a C or C++ compiler which does not properly handle && and
> I'll show you a compiler which nobody uses for real software.  It
> is a firm dictate of the language that && and !! fully evaluate the
> left operand, before starting to evaluate the right.

I was pretty sure that in such situations, the other two operands wouldn't
be evaluated if the first one is already false, yes... that's why I use this
style all over my code... and if it didn't work as I (and appearently the
standard ;) expected, my code would be (even more) buggy ;)

| alexander ewering              instinctive mediaworks
| ae[@]instinctive[.]de   http://www[.]instinctive[.]de


More information about the Bf-committers mailing list