Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site rabbit.UUCP Path: utzoo!linus!decvax!harpo!eagle!allegra!alice!rabbit!mjs From: mjs@rabbit.UUCP Newsgroups: net.lang.c Subject: Re: Must useless expressions be evaluated? Message-ID: <2060@rabbit.UUCP> Date: Thu, 13-Oct-83 18:44:33 EDT Article-I.D.: rabbit.2060 Posted: Thu Oct 13 18:44:33 1983 Date-Received: Fri, 14-Oct-83 20:07:18 EDT References: <187@bbncca.ARPA> Organization: AT&T Bell Laboratories, Murray Hill Lines: 12 Various optimizers will detect `dead' scratch registers & delete the assembly language which generates the value (if the assembly code has no other side effects, such as auto-incrementing a different register). I'm not certain if the current /lib/c2 for the VAX does this, but it should. Yes, I suppose it would be nice if the compiler didn't generate such code in the first place, and my guess is that it would be completely legitimate for it to do so, however, I don't believe that PCC can easily be made to do this. -- Marty Shannon UUCP: {alice,rabbit,research}!mjs Phone: 201-582-3199