This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: HUGE_VALF and HUGE_VALL support


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).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]