Fix HUGE_VAL warnings
This commit is contained in:
parent
f3e0c5c381
commit
d81563a9b1
@ -5,10 +5,19 @@
|
|||||||
* Author: Hans van Eck
|
* Author: Hans van Eck
|
||||||
*/
|
*/
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
|
#include <assert.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
double
|
double
|
||||||
__huge_val(void)
|
__huge_val(void)
|
||||||
{
|
{
|
||||||
|
#if (CHIP == INTEL)
|
||||||
|
static unsigned char ieee_infinity[] = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f };
|
||||||
|
|
||||||
|
assert(sizeof(double) == sizeof(ieee_infinity));
|
||||||
|
return *(double *) ieee_infinity;
|
||||||
|
#else
|
||||||
return 1.0e+1000; /* This will generate a warning */
|
return 1.0e+1000; /* This will generate a warning */
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user