*BSD News Article 20831


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!mcrcim.mcgill.edu!sifon!homer.cs.mcgill.ca!storm
From: storm@cs.mcgill.ca (Marc WANDSCHNEIDER)
Newsgroups: comp.os.386bsd.questions
Subject: Re: gcc-2.4.5 dosen't compile
Date: 12 Sep 1993 18:26:38 GMT
Organization: SOCS, McGill University, Montreal, Canada
Lines: 114
Message-ID: <26vpku$k78@homer.cs.mcgill.ca>
References: <26vnve$efu@usenet.ins.cwru.edu>
NNTP-Posting-Host: mnementh.cs.mcgill.ca

In article <26vnve$efu@usenet.ins.cwru.edu>,
Christopher L. Mikkelson <dq476@cleveland.Freenet.Edu> wrote:
>
>  I am attempting to build gcc-2.4.5 on my 386bsd system(pk 0.2.3)
>but get an error similar to:
>/xgcc -B./  -DIN_GCC   -g     -DNO_MEM -DNO_STDDEF -DNO_LONG_DOUBLE_IO -O0
>-I.c
>/enquire.c: In function `fprop':
>/enquire.c:2307: floating constant out of range
>*** Error code 1
>
>Stop.
>which is the same error I got with 2.3.3.  What do I have to do?


	This question is  posted about once a fortnight on this newsgroup.

	Here is the answer:


	[Note that both NetBSD and FreeBSD now come with gcc 2.4.5
	by default....]

						Toodlepip!
						Marc 'em.


In article <1993May4.111203.28674@ucthpx.uct.ac.za> crawford@comgate.ee.uct.ac.za (Brian Crawford) writes:
>Has anyone with 386bsd rel. 0.1 w/ patchescompile gcc had the following 
>problem with enquire.c:
>
>/xgcc -B./  -DIN_GCC   -g     -DNO_MEM -DNO_STDDEF -DNO_LONG_DOUBLE_IO -O0 -I.
>-c ./enquire.c
>/enquire.c: In function 'fprop':
>/enquire.c:2307: floating constant out of range
>*** Error code 1
>

In compiling gcc-2.3.3 under NetBSD, I found the same 
problem and posted the question whiche no one responded to....

So I use our news archival at minnie.cs.adfa.oz.au to get my answer :-)

Here is an old post that I found sorry I lost the header ...


Happy Reading,
Amancio Hasty

----------------------------------

The problem is not a floating constant out of range. The problem
is a floating point stack overflow. To get passed this, manually
compile fold-const.c using -S in place of -c. Edit fold-const.s
and replace "fsts" with "fstps" in _real_value_truncate. Then
assemble (as -o fold-const.o fold-const.s). 
 
There is also a circular dependancy for protoize.o/unprotoize.o in the
Makefile. Add the lines
 
        touch protoize.o
        touch unprotoize.o
 
after the line
 
        touch stamp-proto
 
After this "make bootstrap" will run to completion.
The problem is inaccurate rounding (in atof()) more than the lack of
digits.
 
>#define DBL_MAX         1.7976931348623157E+308
 
The correct rounding of the last three digits is 159, not 157.  I'm
not sure what should happen when either of these is rounded to 160
and the last 0 is dropped.  The dropped digit is really beyond the
 
        00 00 00 00 00 00 00 F0 7F
 
gas apparently has bugs too.  It should produce +Infinity.  I think it is
OK internally but it may be trusting the library too much.  gcc can easily
be changed to avoid printf for output, but input is harder.
 
One value that works is
 
#define DBL_MAX         1.7976931348623147E+308
                                        ^ was 5
 
gcc prints 58 for the last two digits and gas converts the number correctly.
Printing the number then puts 68 in the last 2 digits...
 
All this is for the stock 386BSD-0.1 gcc and gas binaries.  Partial fixes



--------------------------------------





I really believe that flexfax is g++ resistant
-- 
This message brought to you by the letters X and S and the number 3
Amancio Hasty           |  
Home: (415) 495-3046    |  ftp-site depository of all my work:
e-mail hasty@netcom.com	|  sunvis.rtpnc.epa.gov:/pub/386bsd/incoming


-- 
----------------------------------------------------------------------------
Marc Wandschneider					    Seattle, WA
	"Satan has a stranglehold on my toilet and he won't let go!"
			   - frm the Weekly World News