gary%sun.mcs.clarkson.edu@MITVMA.MIT.EDU (10/22/88)
Why does the following program get warnings about floating point
number exceeding range of `double'. 0.0 seems to cause trouble.
------
Program:
------ line numbers
1
2
double F(x) int x;{ 3
double r; 4
r = 5; 5
6
if( r == 0.0 ) 7
return 0.0; 8
else 9
return 1.0; 10
}
----
Compiled with: gcc -v -Wall -c test.c >& $T
----
Error output:
----
/usr/local/Gnu/lib/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dmc68000 -Dsun -Duni
x -Wall -D__HAVE_FPU__ -Dmc68020 test.c /tmp/cca01528.cpp
GNU CPP version 1.26
/usr/local/Gnu/lib/gcc-cc1 /tmp/cca01528.cpp -quiet -dumpbase test.c -Wall -ver
sion -o /tmp/cca01528.s
In function F:
test.c:7: warning: floating point number exceeds range of `double'
test.c:8: warning: floating point number exceeds range of `double'
GNU C version 1.26 (68k, MIT syntax) compiled by GNU C version 1.26.
as -mc68020 /tmp/cca01528.s -o test.o
gcc version 1.26
----
gary@SUN.MCS.CLARKSON.EDU (10/22/88)
Forgot some of the requested information:
This is run on a Sun 3/50, under Sun Unix 4.0.
I didn't install the compiler, so I don't know any other specifics.
If it is important, I can track it down.
-----
Why does the following program get warnings about floating point
number exceeding range of `double'. 0.0 seems to cause trouble.
------
Program:
------ line numbers
1
2
double F(x) int x;{ 3
double r; 4
r = 5; 5
6
if( r == 0.0 ) 7
return 0.0; 8
else 9
return 1.0; 10
}
----
Compiled with: gcc -v -Wall -c test.c >& $T
----
Error output:
----
/usr/local/Gnu/lib/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dmc68000 -Dsun -Dunix -Wall -D__HAVE_FPU__ -Dmc68020 test.c /tmp/cca01528.cpp
GNU CPP version 1.26
/usr/local/Gnu/lib/gcc-cc1 /tmp/cca01528.cpp -quiet -dumpbase test.c -Wall -version -o /tmp/cca01528.s
In function F:
test.c:7: warning: floating point number exceeds range of `double'
test.c:8: warning: floating point number exceeds range of `double'
GNU C version 1.26 (68k, MIT syntax) compiled by GNU C version 1.26.
as -mc68020 /tmp/cca01528.s -o test.o
gcc version 1.26
----