From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,ae6d7754224e7cfb X-Google-Attributes: gidfee84,public X-Google-Thread: 1164f8,ae6d7754224e7cfb X-Google-Attributes: gid1164f8,public From: roy@mchip00.med.nyu.edu (Roy Smith) Subject: Re: horrible "cc -O" bug (DU 3.2c) Date: 1997/05/11 Message-ID: <5l33qi$6fg$1@news.nyu.edu>#1/1 X-Deja-AN: 240778689 References: <5kvqsu$18d$1@news.iastate.edu> Organization: New York University, School of Medicine Newsgroups: comp.unix.osf.osf1,comp.sys.dec >}Someone just called my attention to a really disturbing >}bug in DEC's C compiler. It seems that if a program is >}compiled with "-O", then evaluation of "expr1 && expr2" >}is botched: Even when expr1 evaluates to 0, expr2 gets >}evaluated anyway! >} >}The implications of this bug are rather staggering; for >}example, what if expr2 has side-effects? Gack. Any compiler code generation bug is "really disturbing". This has to be any programmer's worst nightmare. The thought of doing any kind of software developent on a compiler that isn't doing 100% rock-solid code generation gives me the willies. I can live with slow code. I can live with missing language features. I can live with parsers unable to handle arbitrarily complex expressions. But if it compiles, I have to *know* it compiled correctly. We're running DU-4.0B on our new alpha boxes. Is this a problem in the compiler that ships with that system? Should I be pointing my ftp connection at MIT and downloading gcc if I want to be able to sleep nights? -- Roy Smith New York University School of Medicine Copyright 1997 Roy Smith For-profit redistribution prohibited