From: Matt Turner Date: Tue, 2 Dec 2014 19:18:47 +0000 (-0800) Subject: i965: Avoid union literal, for old gcc compatibility. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc3ca485aeae65d8e43079c0d3b4339be3582e18;p=mesa.git i965: Avoid union literal, for old gcc compatibility. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86939 Reviewed-by: Ian Romanick --- 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)