i965: Avoid union literal, for old gcc compatibility.
authorMatt Turner <mattst88@gmail.com>
Tue, 2 Dec 2014 19:18:47 +0000 (11:18 -0800)
committerMatt Turner <mattst88@gmail.com>
Wed, 3 Dec 2014 01:20:16 +0000 (17:20 -0800)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86939
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp

index a21000c6645a95664b45d99fcfe488d76ff4ee54..2ea36fd3810b56c5f391600fd2b505cbdf95a4af 100644 (file)
@@ -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)