Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site hou5d.UUCP Path: utzoo!linus!decvax!harpo!eagle!hou5h!hou5g!hou5f!hou5e!hou5d!mat From: mat@hou5d.UUCP Newsgroups: net.lang.c Subject: Re: Must useless expressions be evaluated? Message-ID: <702@hou5d.UUCP> Date: Fri, 14-Oct-83 19:57:54 EDT Article-I.D.: hou5d.702 Posted: Fri Oct 14 19:57:54 1983 Date-Received: Sun, 16-Oct-83 08:47:41 EDT References: <317@ucbtopaz.CC.Berkeley.ARPA> Organization: AT&T Information Systems Laboratories, Holmdel, NJ Lines: 18 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