cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/06/03:34:53

From: Jeff Weeks <pweeks AT execulink DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Can't find an error! Suspect GCC bug!!!
Date: Fri, 01 Aug 1997 13:58:47 -0400
Organization: Code X Software
Lines: 39
Message-ID: <33E223D7.4F3D2AC5@execulink.com>
References: <33E21BEC DOT 2964E06C AT execulink DOT com>
NNTP-Posting-Host: ppp31.mars.execulink.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

[ snip ]

> float floating_cosine[360];
> float floating_sine[360];
> 
> inline void Floating::init(void) {
>   int i;
>   // initialise the sine and cosine tables (360 degrees).
>   for(i = 0; i <= 360; i++) {
>     floating_cosine[i] = (float)(cos((double)i*3.1415926/180.0));
>     floating_sine[i]   = (float)(sin((double)i*3.1415926/180.0));
>   }
> }

Found my error, and it was SOO simple!  That <= should just be a <!!!  I
hate it when the answer is that simple!!!  I guess I was expecting
something larger, since it only affected floating point math, and only
one of the numbers at that.

> Now to some more serious stuff.  When I added some optomization to the
> project, I got a "compiler internal error."  I added quite a few,
> -ffast-math -02 -finline -finline-functions -fno-strength-reduce.  I
> took out the -finline and -finline-functions and the error disapeared.

However, that doesn't fix this.  The above still occurs, however, I'm
going to upgrade to DJGPP 2.01 and see if that fixed it.

Jeff

PS: Why is it that I always find the answer just after posting the
question? :)

--------------------------------------------
            - Code X Software -
       Programming to a Higher Power
  
  email: mailto:pweeks AT execulink DOT com
  web:	 http://www.execulink.com/~pweeks/
--------------------------------------------

- Raw text -


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