*BSD News Article 82464


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.ececs.uc.edu!news.kei.com!news.mathworks.com!www.nntp.primenet.com!nntp.primenet.com!arclight.uoregon.edu!news.bc.net!unixg.ubc.ca!noc.van.hookup.net!vertex.tor.hookup.net!nic.wat.hookup.net!news
From: schaffer@wat.hookup.net
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Compiler bug?
Date: 7 Nov 1996 18:34:09 GMT
Organization: HookUp Communication Corporation, Waterloo, Ontario, CANADA
Lines: 14
Message-ID: <55ta31$tib@nic.wat.hookup.net>
References: <55p7ck$r2l@csgrad.cs.vt.edu> <55qdup$8jv@sol.ctr.columbia.edu>
Reply-To: schaffer@wat.hookup.net
NNTP-Posting-Host: schaffer.wat.hookup.net
X-Newsreader: IBM NewsReader/2 v1.2

In <55qdup$8jv@sol.ctr.columbia.edu>, wpaul@ctr.columbia.edu (Bill Paul) writes:
> ...
>I believe you have invoked undefined compiler behavior with this code.
>It is therefore not a bug that the result differs from one implementation
>to another: undefined behavior means that the compiler can do anything

Actually, it is even possible for the same compiler to produce different
results, depending on which optimisation level was chosen for the compilation.

> ...
>-Bill

Hartmann Schaffer