Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: () ignored in some expressions
Message-ID: <1990Apr14.235714.6550@utzoo.uucp>
Organization: U of Toronto Zoology
References: <48079@lanl.gov> <1272@sdrc.UUCP> <1458@tkou02.enet.dec.com> <2575@rwthinf.UUCP>
Date: Sat, 14 Apr 90 23:57:14 GMT

In article <2575@rwthinf.UUCP> berg@cip-s02.informatik.rwth-aachen.de (SRB) writes:
>Correct me if I'm wrong, but I thought that if you write it simply as
>"(a + b) + c" then the compiler may still ignore the ().
>But ANSI states: if you write it as "+(a + b) + c" (note the unary plus),
>then the compiler has to evaluate (a+b) first.

You've been confused by a very obsolete draft of ANSI C.  At one point,
this was the case -- the unary plus was the "enforce parentheses" operator,
more or less.  That idea was eventually discarded in favor of a general
"evaluation as written, subject to `as if' optimization" rule.
-- 
With features like this,      |     Henry Spencer at U of Toronto Zoology
who needs bugs?               | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
