Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site abnjh.UUCP Path: utzoo!watmath!clyde!floyd!whuxle!spuxll!abnjh!usenet From: usenet@abnjh.UUCP (usenet) Newsgroups: net.lang.c Subject: Re: if vs ?: - (nf) Message-ID: <476@abnjh.UUCP> Date: Fri, 17-Feb-84 10:29:22 EST Article-I.D.: abnjh.476 Posted: Fri Feb 17 10:29:22 1984 Date-Received: Sat, 18-Feb-84 02:03:09 EST References: <585@bbncca.ARPA> Organization: ATTIS, NJ Lines: 20 The system V pcc compiler for the 3B20S generates two more instructions for "i ? j++ : k++ ;" than it does for "if (i) j++ else k++;" In the former case, it is apparently attempting to get the value of the result of the expression (namely the prior value of j or k, depending on the value of i) into a register. Even though it never uses the value in the register for anything! It does this regardless of the setting of the "-O" (optimize) flag. The only effect of the -O flag is to replace jumps to returns by returns. Rick Thomas ihnp4!abnji!rbt or ihnp4!abnjh!usenet