Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: comp.lang.c Subject: Re: short circuit evaluation Message-ID: <7610@utzoo.UUCP> Date: Mon, 2-Feb-87 22:49:26 EST Article-I.D.: utzoo.7610 Posted: Mon Feb 2 22:49:26 1987 Date-Received: Mon, 2-Feb-87 22:49:26 EST References: <425@bobkat.UUCP> <102600001@datacube> Organization: U of Toronto Zoology Lines: 14 > I did ask Dennis about [short-circuiting of multiplies with a 0 operand] > ... His reply, as I recall it, was > roughly "I think it is defensible in principle, but it caused so many > complaints that newer versions of the compiler don't do it". I should add that X3J11 has come down quite firmly on the pragmatic side of this issue. With the obvious exceptions of && and friends, which are explicitly short-circuited, the compiler is not permitted to leave out side effects of expressions. (Personally, as you might have gathered from my earlier posting, I like the purist approach to this one, but I realize how much havoc it could cause...) -- Legalize Henry Spencer @ U of Toronto Zoology freedom! {allegra,ihnp4,decvax,pyramid}!utzoo!henry