Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site laidbak.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!harpo!ihnp4!laidbak!mark
From: mark@laidbak.UUCP (Mark Brukhartz)
Newsgroups: net.lang.c
Subject: Re: if vs ?: - (nf)
Message-ID: <197@laidbak.UUCP>
Date: Mon, 20-Feb-84 18:42:58 EST
Article-I.D.: laidbak.197
Posted: Mon Feb 20 18:42:58 1984
Date-Received: Wed, 22-Feb-84 02:09:58 EST
References: <585@bbncca.ARPA> <476@abnjh.UUCP>, <1727@rlgvax.UUCP>
Organization: LAI, Westmont, IL
Lines: 16

Some machine-dependent code uses "discarded values" for parameters
to asm() (assembly language) escapes. For example:

	a + b;					/* Assume result goes to r0 */
	asm("	(something using r0)	");	/* Do something funny with r0 */

The "a + b" could just as easily be "a < b ? a++ : b++". Such code
assumes that the compiler and optimizer will not ignore the "unneeded"
statement or value.

Quite a bit of recent Berkeley code uses asm() escapes to generate fast
VAX code. I don't like this any more than you do, but it's something to
keep in mind when considering a change to the compiler.

					Mark Brukhartz
				{allegra,ihnp4,ittral,trsvax}!laidbak!mark