PATCH: HUGE_VAL should be Infinity
Jeffrey A Law
Tue Oct 17 18:51:00 GMT 2000
In message < 200010171851.OAA15821@hiauly1.hia.nrc.ca >you write:
> > In message < 200010170458.AAA23638@hiauly1.hia.nrc.ca >you write:
> > > Having thought a little more about this, I believe the change is wron
> g as i
> > > will make the define in math.h inconsistent with the system's existin
> g math
> > > library. Thus, the patch should not be applied.
> > Excellent point.
> > I guess the "fix" is to upgrade to hpux11 where this situation is handled
> > more gracefully. FWIW, I do most of my hpux work on hpux11 now.
> After thinking about this overnight, I beieve the hugeval.c test should be
> changed because the second half is not a compiler test. It checks whether
> the definition of HUGE_VAL is +Infinity. The linux math.h header states
> that HUGE_VAL is +Infinity on all IEEE754 machines. However, this appears
> not to be the case. In any case, systems predating the standard or without
> ieee floating point will fail the hugeval test. Since I don't think
> compiler tests should fail when there is nothing wrong with the compiler,
> I will try to come up with a test fix.
Another option (if fixing hugeval.c is a pain) is to move hugeval.c into the
ieee directory which makes it clearer that it depends on ieee754 arithmetic.
More information about the Gcc-patches