Must useless expressions be evaluated?

Kurt Guntheroth kurt at fluke.UUCP
Tue Oct 18 02:05:08 AEST 1983


Of course it is legitimate to not do ANY operation which has no side
effects.  By definition, if the operation has no side effects, the presence
or absense of the operation will not change the state of execution except
perhaps by changing the amount of time execution takes.

It must be remembered though, that all the operands of a dead operation must
be evaluated if the operands cause side effects.

-- 
Kurt Guntheroth
John Fluke Mfg. Co., Inc.
{uw-beaver,decvax!microsof,ucbvax!lbl-csam,allegra,ssc-vax}!fluke!kurt



More information about the Comp.lang.c mailing list