Path: utzoo!utgpu!water!watmath!clyde!att!mtunx!whuts!homxb!hropus!ki4pv!tanner
From: tanner@ki4pv.uucp (Dr. T. Andrews)
Newsgroups: comp.lang.c
Subject: "Honour Parens" Rule (was: Re: Should I convert FORTRAN code to C?)
Summary: existing technology is sometimes too dull for a committee
Message-ID: <6958@ki4pv.uucp>
Date: 22 Jun 88 11:01:17 GMT
References: <2742@utastro.UUCP> <20008@beta.UUCP> <10655@agate.BERKELEY.EDU> <8130@brl-smoke.ARPA>
Organization: CompuData Inc., DeLand
Lines: 23

In article <8130@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes:
) ...  There was so much public objection to [unary plus], and so much
) clamor for parentheses forcing order of evaluation, ....
) parentheses order forcing was adopted instead.

While the unary plus was something of a stomach-turner, it seems that
the C group got confused into thinking it was the fortran group.  Would
it not have been better to codify the existing practice of stuffing
results into a variable named "tmp" if evaluation order was incredibly
important?

That's how users of "existing technology" compilers do it.  A clever
"-O" option might come by and eliminate the actual store to "tmp" if
it wasn't used later, but (considering the "as if actually done"
rule) couldn't re-arrange the expression further if it would be
unsafe.

It is probably a good idea for code which really cares to continue to
stuff the intermediate results into "tmp" for some years, until X3J11
compilers become moderately universal.
-- 
rutgers!bpa!cdin-1!cdis-1!ki4pv!tanner  (better than it looks!)
or...  {allegra codas killer decvax!ucf-cs}!ki4pv!tanner