Should nanl(0) crash?

Ulrich Drepper drepper@redhat.com
Sat Jul 24 23:11:00 GMT 2004


Petter Reinholdtsen wrote:
> This code compile, run and print 0 on Tru64 Unix.  On Linux, it
> crashes with a segfault.  Is it legal to call nanl(0)?  I tried
> checking the C standard, but that didn't make me wiser. :(

Why should this not crash?  It's no different from strlen(0) or atof(0).

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖



More information about the Libc-alpha mailing list