PCC compiler question

utzoo!watmath!watarts!bernie utzoo!watmath!watarts!bernie
Wed Mar 30 10:10:45 AEST 1983


Yes, the statement
       a && b *= c;
is a curious thing.  Nevertheless, it makes sense as
       if (a) b *= c;
since the compiler is really regarding it
as
       a && (b *= c);
and will only evaluate the (b *= c) part if the a part is non-zero.
That is, if a is false, there's no need to evaluate the other operand
of && since the overall value of the expression is already known.
				--Bernie Roehl
				...decvax!watmath!watarts!bernie



More information about the Comp.lang.c mailing list