Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site dataio.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!tektronix!uw-beaver!uw-june!entropy!dataio!bright
From: bright@dataio.UUCP (Walter Bright)
Newsgroups: net.lang.c
Subject: Re: Unary plus ( + )
Message-ID: <764@dataio.UUCP>
Date: Mon, 12-Aug-85 05:47:24 EDT
Article-I.D.: dataio.764
Posted: Mon Aug 12 05:47:24 1985
Date-Received: Sun, 18-Aug-85 01:02:34 EDT
Reply-To: bright@dataio.UUCP (Walter Bright
Organization: Data I/O Corp., Redmond WA
Lines: 15

In article <610@cyb-eng.UUCP> bc@cyb-eng.UUCP (Bill Crews) writes:
>OK, I understand that order of evaluation is not guaranteed.  I assume that
>was done to make compilers easier to write.  Is there any other reason?  Does
>it really make compilers easier to write?

Yes, it really does. The reason is because C provides a very large number
of operators, and therefore an enormous number of combinations of them.
Code generators must be able to handle all this, and so to reduce the
complexity of the task, expressions are usually reorganized and manipulated
until they fit into a relatively small number of forms.

Also, allowing the compiler to reorder the expression within certain
limits allows it to do some optimizations. Most code is not affected by
order of evaluation, and C does allow an order to be forced (by assigning
an explicit temporary), so I think this is very reasonable.