Path: utzoo!telly!ddsw1!lll-winken!killer!osu-cis!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!gary%sun.mcs.clarkson.edu From: gary%sun.mcs.clarkson.edu@MITVMA.MIT.EDU Newsgroups: gnu.gcc.bug Subject: non-obvious warning Message-ID: <8810211937.AA01532@milo.mcs.clarkson.edu> Date: 21 Oct 88 19:37:33 GMT Sender: news@tut.cis.ohio-state.edu Organization: GNUs Not Usenet Lines: 32 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 ----