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

Garrick Staples garrick at usc.edu
Wed Aug 29 08:59:05 MDT 2007


On Wed, Aug 29, 2007 at 10:23:44AM -0400, Glen Beane alleged:
> 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

It would seem to me that if HUGE_VAL doesn't fit in a double, then the compiler
or header files are definitely broken.

What does 'gcc -E' give you for that file?  I get:

  int main (int argc, char **argv)
  {
     double x = (__builtin_huge_val());
  
     return 0;
  }

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20070829/3583bfcb/attachment.bin


More information about the torquedev mailing list