From bc3ca485aeae65d8e43079c0d3b4339be3582e18 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Tue, 2 Dec 2014 11:18:47 -0800 Subject: [PATCH] i965: Avoid union literal, for old gcc compatibility. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86939 Reviewed-by: Ian Romanick --- src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp b/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp index a21000c6645..2ea36fd3810 100644 --- a/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp +++ b/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp @@ -60,7 +60,8 @@ union fu { static unsigned f2u(float f) { - return (union fu){ .f = f }.u; + union fu fu = { .f = f }; + return fu.u; } TEST_F(vf_float_conversion_test, test_vf_to_float) -- 2.30.2