summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-12-02 11:18:47 -0800
committerMatt Turner <[email protected]>2014-12-02 17:20:16 -0800
commitbc3ca485aeae65d8e43079c0d3b4339be3582e18 (patch)
treef4a865dcba6e5df5de2e5927e4009f1206ff2785 /src
parentf0fa6a5e86c356ef488355996bb4f64880ab639b (diff)
i965: Avoid union literal, for old gcc compatibility.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86939 Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp3
1 files changed, 2 insertions, 1 deletions
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)