[Mesa-dev] [PATCH] i965: Avoid union literal, for old gcc compatibility.
Ian Romanick
idr at freedesktop.org
Tue Dec 2 11:30:13 PST 2014
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
On 12/02/2014 11:24 AM, Matt Turner wrote:
> 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)
>
More information about the mesa-dev
mailing list