From c7b78b63dbcccbf4001f5c8811f673cbff1250b0 Mon Sep 17 00:00:00 2001 From: bde Date: Mon, 11 Jun 2007 07:48:52 +0000 Subject: [PATCH] Fix an aliasing bug which was finally detected by gcc-4.2. fdlibm has hundreds of similar aliasing bugs, but all except this one seem to have been fixed by Cygnus and/or NetBSD before the modified version of fdlibm was imported into FreeBSD in 1994. PR: standards/113147 Submitted by: Steve Kargl --- lib/msun/src/s_frexpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msun/src/s_frexpf.c b/lib/msun/src/s_frexpf.c index 1952836ffa03..477807bcb2e2 100644 --- a/lib/msun/src/s_frexpf.c +++ b/lib/msun/src/s_frexpf.c @@ -39,6 +39,6 @@ frexpf(float x, int *eptr) } *eptr += (ix>>23)-126; hx = (hx&0x807fffff)|0x3f000000; - *(int*)&x = hx; + SET_FLOAT_WORD(x,hx); return x; }