Mesa (master): i965: Fix union usage for G++ <= 4.6.
Vinson Lee
vlee at kemper.freedesktop.org
Tue Dec 9 00:25:42 UTC 2014
Module: Mesa
Branch: master
Commit: d20235f79a4b2786c984175b502b97ac73648781
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d20235f79a4b2786c984175b502b97ac73648781
Author: Vinson Lee <vlee at freedesktop.org>
Date: Fri Dec 5 18:05:06 2014 -0800
i965: Fix union usage for G++ <= 4.6.
This patch fixes this build error with G++ <= 4.6.
CXX test_vf_float_conversions.o
test_vf_float_conversions.cpp: In function ‘unsigned int f2u(float)’:
test_vf_float_conversions.cpp:63:20: error: expected primary-expression before ‘.’ token
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86939
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
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 2ea36fd..6a8bcea 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)
{
- union fu fu = { .f = f };
+ union fu fu;
+ fu.f = f;
return fu.u;
}
More information about the mesa-commit
mailing list