HUGE_VALF and HUGE_VALL support

Jeff Johnston jjohnstn@redhat.com
Tue Oct 25 15:51:00 GMT 2005


Joseph S. Myers wrote:
> On Fri, 14 Oct 2005, Jeff Johnston wrote:
> 
> 
>>I mentioned a while back that I would take a crack at adding these values to
>>newlib.  I have had some code kicking around for a while that was getting in
>>the way of some recent posted changes so I just checked it in.  It has been
>>built and tested on i686-pc-linux-gnu.
> 
> 
> For GCC >= 3.3 I'd recommend using
> 
> # define HUGE_VAL       (__builtin_huge_val())
> # define HUGE_VALF      (__builtin_huge_valf())
> # define HUGE_VALL      (__builtin_huge_vall())
> 
> (as used by glibc) which are usable in static initializers as required by 
> the C standard (unlike any version using constant variables).
> 

Good suggestion.  Code has been checked in.

-- Jeff J.



More information about the Newlib mailing list