From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,ae6d7754224e7cfb X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,ae6d7754224e7cfb X-Google-Attributes: gidfee84,public From: petr@duttnxc.tn.tudelft.nl.nospam (Peter Kocourek) Subject: Re: horrible "cc -O" bug (DU 3.2c) Date: 1997/05/12 Message-ID: <199705122053371231272@kocourek.tn.tudelft.nl>#1/1 X-Deja-AN: 241119883 References: <5kvqsu$18d$1@news.iastate.edu> <5l33qi$6fg$1@news.nyu.edu> <33763487.7250953E@highway1.com> Organization: Institute for Advanced Chocolate Studies Newsgroups: comp.unix.osf.osf1,comp.sys.dec Gerald A. Feldman 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.