From 24ae7c4c1f18c3086a779a2ee8f480ee5f4e7612 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 15 Jun 2001 15:22:07 +0000 Subject: Added fi_type union typedef to glheader.h. Replace various float/int casts with the fi_type union cast. Fixes -fstrict-aliasing problems. --- src/mesa/tnl/t_vb_render.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa/tnl/t_vb_render.c') diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c index 414c6bd34a..ec3cb02bb6 100644 --- a/src/mesa/tnl/t_vb_render.c +++ b/src/mesa/tnl/t_vb_render.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_render.c,v 1.20 2001/05/11 15:53:06 keithw Exp $ */ +/* $Id: t_vb_render.c,v 1.21 2001/06/15 15:22:08 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -69,8 +69,8 @@ #if defined(USE_IEEE) -#define NEGATIVE(x) ((*(GLuint *)&x) & (1<<31)) -#define DIFFERENT_SIGNS(x,y) (((*(GLuint *)&x)^(*(GLuint *)&y)) & (1<<31)) +#define NEGATIVE(x) (GET_FLOAT_BITS(x) & (1<<31)) +#define DIFFERENT_SIGNS(x,y) ((GET_FLOAT_BITS(x) ^ GET_FLOAT_BITS(y)) & (1<<31)) #else #define NEGATIVE(x) (x < 0) #define DIFFERENT_SIGNS(x,y) (x * y <= 0 && x - y != 0) -- cgit v1.2.3