delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/10/14:13:42

Message-Id: <m0yCOnz-000S2kC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: molnarl AT cdata DOT tvnet DOT hu, djgpp-workers AT delorie DOT com
Date: Tue, 10 Mar 1998 16:12:22 +0000
MIME-Version: 1.0
Subject: Re: ISN'T A BUG in 2.8.0
In-reply-to: <Pine.GSO.3.96.980310184736.1261A-100000@dumballah.tvnet.hu>

molnarl AT cdata DOT tvnet DOT hu wrote:

> On Tue, Mar 10, 1998 at 09:57:47AM +0000, Salvador Eduardo Tropea (SET)
> wrote:
> > molnarl AT cdata DOT tvnet DOT hu wrote:
> > >Hi!
> > >
> > >I'm not sure whether it is a new bug. I've found it with the latest
> > >test version of perl.
> > >
> > >This program is a feature test for perl. Compile this with -O0 and it
> > >prints 0, but with -O2 it prints 1. This bug also appears on linux
> > >(2.7.2.3).
> [...]
> > That's isn't considered as a bug by the gcc maintainers. Just compile
> like
> > that: -O2 -ffloat-store and you'll get 0.
> 
> The perl folks will use another work around, because -ffloat-store is a
> little bit too gcc specific for this feature test :-) But it's still
> interesting that pgcc doesn't have this problem.

I don't know if pgcc enables the -fno-float-store like gcc 2.7.x and 2.8.x does 
when you use optimization.
This problem was reported to bug-gcc a lot of time ago and the maintainers said 
that is not a bug. Is hard to determine, floating point values have a limited 
resolution and the format can vary from platform to platform so you can't use a 
code that suppose some kind of "special resolution" or "special format". The 
code that you posted makes some assumptions that can or can't be true, in fact 
if the compiler generates code that uses extra precision it fails.

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019