This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: Patch for gcc.c-torture/execute/ieee/20010226-1.c


Hi,

>The following is an even more general alternative:
>
>   #include <limits.h>
>   ...
>
>   if (sizeof(long double) * CHAR_BIT < 79)
>     exit (0);

This solution could be the best if we could include limits.h. Sorry, I
changed the 
(CHAR_BIT < 79), in accordance, with IEEE Specs on long double. 
Could someone point whether it is OK to include the header.

The other solution of making a test.x, could be employed if this wasn't
allowed.

Just hoping, Is there some way to find out the number of significand
precision bits. 
That would make the solution, er .., complete.

The other solution,
   if (sizeof(long double) <= 4 && ((unsigned char)-1) == 255)
     exit (0);

would again make it specific, something we are trying to avoid, isn't it ;-)

{
   #if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__)
	Thanks for pointing that, Silly me, I will remember next time ;-))
}

Thanks a lot,

Venky

____________________________________________________________

`Contrariwise,' continued Tweedledee, `if it was so, it might be; and if it
were so, it would be; but as it isn't, it ain't. That's logic.' 



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