From: petr@duttnxc.tn.tudelft.nl.nospam (Peter Kocourek)
Subject: Re: horrible "cc -O" bug (DU 3.2c)
Date: 1997/05/12 [thread overview]
Message-ID: <199705122053371231272@kocourek.tn.tudelft.nl> (raw)
In-Reply-To: 33763487.7250953E@highway1.com
Gerald A. Feldman <gaf@highway1.com> wrote:
> First of all, from looking at the code, it does not appear to be a code
> generation bug at all. It is only a bug if the code beyond the && would
> cause a side effect, such as invoke a function, modify a variable, or
> cause an exception. In this case, it works nicely because the alpha
[snip]
The C standard explicitly forbids the execution of the rhs expression of
the && operator, if the lhs expression if false. Writing
x && 1/x
should never cause a divide-by-zero exception (or the equivalent an
Alpha's.)
If the DEC compiler does execute 1/x, even if x is zero, it's broken.
Peter.
next prev parent reply other threads:[~1997-05-12 4:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-05-09 4:00 horrible "cc -O" bug (DU 3.2c) Mark Bartelt
1997-05-09 4:00 ` Jonathan Rozes
1997-05-09 4:00 ` John Hascall
1997-05-10 4:00 ` Gerald Feldman
1997-05-11 4:00 ` Roy Smith
1997-05-11 4:00 ` Michael C. Grant
1997-05-11 4:00 ` Gerald A. Feldman
1997-05-11 4:00 ` Roy Smith
1997-05-12 4:00 ` Jeff Sullivan USG
1997-05-12 4:00 ` Gerald A. Feldman
1997-05-12 4:00 ` Mark Bartelt
1997-05-12 4:00 ` Andy Isaacson
1997-05-12 4:00 ` John Reinitz
1997-05-13 4:00 ` Mark Bartelt
1997-05-12 4:00 ` Jeff Sullivan USG
1997-05-12 4:00 ` Peter Kocourek [this message]
1997-05-12 4:00 ` Bob Vickers
[not found] ` <5l7hap$7la@usenet.pa.dec.com>
1997-05-12 4:00 ` Gerald A. Feldman
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox