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: mark@cita.toronto.edu (Mark Bartelt) Subject: Re: horrible "cc -O" bug (DU 3.2c) Date: 1997/05/13 Message-ID: #1/1 X-Deja-AN: 241417119 Sender: nntp@utcc.utoronto.ca (News) X-Nntp-Posting-Host: rorqual.cita.utoronto.ca References: <5kvqsu$18d$1@news.iastate.edu> <5l5i98$hbk$1@news.nyu.edu> Organization: Canadian Institute for Theoretical Astrophysics Reply-To: mark@cita.utoronto.ca Newsgroups: comp.unix.osf.osf1,comp.sys.dec [ Andy Isaacson ] >> Absolutely. However, the "bug" was observed by inspecting disassembled >> object code. This is a case of the "looks like" effect. Um, no. This bug (no quotes around it, since it *is* a bug) was discovered because a correct program dumped core. I posted the original code fragment which demonstrated the problem. Someone else posted the disassembled object code, to show exactly *how* the compiler was screwing up. >> If the code to >> the right of the || or && has no side effects, then the program >> _cannot know_ if the code was executed or not. In that case, the compiler >> is completely justified in executing the code anyway, if it wants to. If >> the code has some side effects, however, the compiler must ensure that it >> is not executed in error. >> >> End result? I am not convinced that this is a bug. If the compiler >> generates correct results for all cases, then it is not a bug. Sorry, go back and read the thread in its entirety, from the beginning. That should convince you that this really *is* a bug. (And a couple of Digits have acknowledged, via e-mail, that they agree.) Mark Bartelt 416/978-5619 Canadian Institute for mark@cita.utoronto.ca Theoretical Astrophysics http://www.cita.utoronto.ca/~mark "Sheep not busy being shorn are busy frying" -- Dylan, at a NZ lamb barbecue [ singing "It's all right, ma (I'm only bleating)" ]