Must useless expressions be evaluated?
mat at hou5d.UUCP
mat at hou5d.UUCP
Sat Oct 15 09:57:54 AEST 1983
I think useless expressions must be evaluated, simply
because there is no syntactic criterion to determine the uselessness
of any expression. For example,
(i=j)+something()+k++;
is not syntactically different from
(i=j)+1+k++;
Not SYNTACTICALLY different, but SEMANTICALLY different. And since the
compiler, at many levels from syntax description through parse trees
and code generation templates right out to the optimizer's linked lists
of statements or quads or basic blocks or whatever HAS got syntactic
information about live values and side effects available, it makes
sense to use that information.
Mark Terribile
Duke of deNet
More information about the Comp.lang.c
mailing list