From 59b24d359e79c9c56ef1a3581b648326358c36f4 Mon Sep 17 00:00:00 2001 From: archie Date: Thu, 19 Sep 2002 19:47:27 +0000 Subject: Fix a problem with the definition of HUGE_VAL causing the gcc warning "cast increases required alignment of target type" on some platforms. Reviewed by: bde --- lib/msun/src/math.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/msun/src') diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index 108b086..5f7312b 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -20,8 +20,11 @@ /* * ANSI/POSIX */ -extern char __infinity[]; -#define HUGE_VAL (*(double *) __infinity) +extern const union __infinity_un { + unsigned char __uc[8]; + double __ud; +} __infinity; +#define HUGE_VAL (__infinity.__ud) /* * XOPEN/SVID -- cgit v1.1