Subject: Re: 2.0 isn't self-building
To: Tom Ivar Helbekkmo <tih@eunetnorge.no>
From: None <ragge@ludd.luth.se>
List: port-vax
Date: 03/03/2005 13:41:33
> 
> #include <stdio.h>
> #include <stdlib.h>
> 
> int main(int argc, char **argv) {
>         double d;
> 
>         d = strtod("NaN", NULL);
>         printf("%lf\n", d);
> }
> 
> % cc -g -o test test.c
> % gdb test
> (gdb) run
> Starting program: /u/tih/test 
> Program received signal SIGILL, Illegal instruction.
>
This is correct behavoiur, NaN on vax is considered an
illegal value to deal with.  Actually there is no NaN on vax,
so it is setup to give a trap instead. strtod.c says:

#ifdef VAX
                /* Lacking a quiet NaN, build a reserved operand. */
                word0(rv) = Sign_bit;
                word1(rv) = 0;
#endif

-- Ragge