[torquedev] Re: trunk not compiiing on OS X 10.4

Glen Beane glen.beane at gmail.com
Wed Aug 29 08:23:44 MDT 2007


On 8/29/07, Glen Beane <glen.beane at gmail.com> wrote:
> the use of HUGE_VAL causes a warning "floating constant exceeds range
> of 'double'"
>
> thse files have not changed in quite some time.  any ideas?  I haven't
> tried to compile torque on OS X for a while since I've been working
> primarilly in Linux.
>
>
> gcc version 4.0.1 (Apple Computer, Inc. build 5341)
>
>
>
>
> ../Libdis/disp10d_.c: In function 'disp10d_':
> ../Libdis/disp10d_.c:107: warning: floating constant exceeds range of 'double'
> ../Libdis/disp10d_.c:115: warning: floating constant exceeds range of 'double'
> make[3]: *** [disp10d_.lo] Error 1
> make[3]: *** Waiting for unfinished jobs....
> cc1: warnings being treated as errors
> ../Libdis/disp10l_.c: In function 'disp10l_':
> ../Libdis/disp10l_.c:135: warning: floating constant exceeds range of 'double'
> ../Libdis/disp10l_.c:158: warning: floating constant exceeds range of 'double'
> make[3]: *** [disp10l_.lo] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all-recursive] Error 1
>


I can reproduce this with a very tiny C progra:


mightymac:/tmp gbeane$ cat test.c
#include <math.h>

int main (int argc, char **argv)
{
   double x = HUGE_VAL;

   return 0;
}
mightymac:/tmp gbeane$ gcc -pedantic  test.c
test.c: In function 'main':
test.c:5: warning: floating constant exceeds range of 'double'
mightymac:/tmp gbeane$ gcc test.c
mightymac:/tmp gbeane$



It seems to me like a bug in the version of gcc on my Mac.  I think a
near term solution is to not compile anything with HUGE_VAL with
-pedantic


More information about the torquedev mailing list