[Mesa-dev] [PATCH] i965: Avoid union literal, for old gcc compatibility.
Matt Turner
mattst88 at gmail.com
Tue Dec 2 11:24:42 PST 2014
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86939
---
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 a21000c..2ea36fd 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.0.4
More information about the mesa-dev
mailing list