i965: Fix union usage for G++ <= 4.6.
This patch fixes this build error with G++ <= 4.6. CXX test_vf_float_conversions.o test_vf_float_conversions.cpp: In function ‘unsigned int f2u(float)’: test_vf_float_conversions.cpp:63:20: error: expected primary-expression before ‘.’ token Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86939 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
70dd3df344
commit
d20235f79a
|
@ -60,7 +60,8 @@ union fu {
|
|||
static unsigned
|
||||
f2u(float f)
|
||||
{
|
||||
union fu fu = { .f = f };
|
||||
union fu fu;
|
||||
fu.f = f;
|
||||
return fu.u;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue