newlib's nan(void) x ISO C99 nan(const char *)

Alexandre Oliva
Wed Jul 9 20:02:00 GMT 2003

On Jul  3, 2003, Alexandre Oliva <> wrote:

> Would anybody mind if we dropped nan(void) and nanf(void) in favor of
> the ISO C99-compliant functions that take a string as an argument?
> Should we try to retain backward-compatibility by means of macro
> magic, or just bite the bullet and replace the old, non-conforming
> functions and prototypes with the now-Standard ones?

> If nobody objects, I'll implement the Standard-compliant functions in
> the next few days.

strtod() didn't support NAN(...), whose code I meant to borrow for
nan(), so I'm being lazy and just disregarding the argument of nan()
and nanf().  I doubt anyone cares.  The macro adaptors in
linux/cmath/math_private.h already did it and nobody seemed to care,
so...  Approved by Jeff Johnston, I'm checking this in:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: newlib-nan-c99.patch
Type: text/x-patch
Size: 3631 bytes
Desc: not available
URL: <>
-------------- next part --------------

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                 aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist                Professional serial bug killer

More information about the Newlib mailing list