Subject: Re: libc arch/*/gen cleanup
To: None <tech-userlevel@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-userlevel
Date: 10/28/2001 16:54:14
In article <20011028101228.CB17C1E524@thoreau.thistledown.com.au>,
Simon Burge <simonb@wasabisystems.com> wrote:
>Klaus Klein wrote:
>
>> Simon Burge <simonb@wasabisystems.com> writes:
>> 
>> > 	/* bytes for quiet NaN (IEEE single precision) */
>> > 	const char __nanf[] __attribute__((__aligned__(__alignof__(single)))) =
>> 
>> Presumably you mean 'float' here. :-) BTW, I've also thought of
>> solving this in a more portable way, i.e. making this a union
>> consisting of float-type and char.
>
>How does this look then...
>
>in <math.h> have:
> 
>        union __infinity_u {
>                unsigned char val[8];
>                double dummy;
>        };
>        extern __const union __infinity_u __infinity;
>        #define HUGE_VAL        (*(__const double *)(__const void *)&__infinity)

I don't see why we need to have more than two union types. One for double
and one for float.

christos