Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: () ignored in some expressions Message-ID: <16414@haddock.ima.isc.com> Date: 9 Apr 90 19:31:49 GMT References: <48079@lanl.gov> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 20 In article <48079@lanl.gov> u096000@lanl.gov (Roger A. Cole) writes: >In K&R1, expressions involving one of the associative and commutative >operators can be arranged even when parenthesized. It can be argued that this was really a statement about a particular compiler rather than a language feature. >From the first time I read this, I've had difficulty not throwing up in >instances where this applies. I might be able to accept this *feature* >a little more peacefully if someone could explain the basis for it. Optimization. With unsigned integers (and also signed integers in the usual implementation), you get exactly the same answer anyway, so why not explicitly allow it? >Is this feature also present in ANSI standard C? No. The places where it's useful are already covered by the as-if rule. Karl W. Z. Heuer (karl@ima.ima.isc.com or harvard!ima!karl), The Walking Lint