Re: marking mystery code

preston@tera.com (Preston Briggs)
17 Feb 1996 22:51:23 -0500

          From comp.compilers

Related articles
Re: marking mystery code dewar@cs.nyu.edu (1996-02-13)
Re: marking mystery code dennison@escmail.orl.mmc.com (Ted Dennison) (1996-02-14)
Re: marking mystery code jmccarty@spdmail.spd.dsccc.com (1996-02-14)
Re: marking mystery code jgj@ssd.hcsc.com (1996-02-16)
Re: marking mystery code hagerman@ece.cmu.edu (1996-02-16)
Re: marking mystery code mnp@compass-da.com (Mitchell Perilstein) (1996-02-16)
Re: marking mystery code toon@moene.indiv.nluug.nl (Toon Moene) (1996-02-16)
Re: marking mystery code preston@tera.com (1996-02-17)
Re: marking mystery code rfg@monkeys.com (1996-02-19)
Re: marking mystery code kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) (1996-02-21)
Re: marking mystery code xanthian@qualcomm.com (1996-02-24)
| List of all articles for this month |
From: preston@tera.com (Preston Briggs)
Newsgroups: comp.compilers
Date: 17 Feb 1996 22:51:23 -0500
Organization: Compilers Central
References: 96-02-138 96-02-156 96-02-194
Keywords: GCC, C

>[My recollection was that the code was something like this:
>
> if(a<0) goto A;
> if(a=0) goto B;
> if(a<0) goto C;
> halt; -- cannot happen
>
>and it happened. -John]


I assume you meant


if(a<0) goto A;
if(a=0) goto B;
if(a>0) goto C;
halt; -- cannot happen


If "a" is floating point and a NAN, then the code should fall through
all those tests. Suprising sometimes, but that's the way it is.


Preston Briggs
[The example was fixed point. I think a bug somewhere else caused a jump to
the second test, and a happened to be less than zero. -John]


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.