Must useless expressions be evaluated?

Ken Turkowski ken at turtleva.UUCP
Fri Oct 14 17:11:38 AEST 1983


Another C compiler implementation issue is whether to do computations
in shorts when the destination and all the operands are shorts.  How
about multiplying two shorts giving a long, without converting the
shorts to longs and using lmul?  Testing bits by using the bit test
instruction instead of ANDing?  This last one may be an optimizer
problem, but the first two are related to K&R's assertion that all
computations be done in ints, or that to get a long result, at least
one of the operands must be long.

			Ken Turkowski
		    CADLINC, Palo Alto
		{decwrl,amd70}!turtlevax!ken



More information about the Comp.lang.c mailing list