Bug 86939 - test_vf_float_conversions.cpp:63:12: error: expected primary-expression before ‘union’
Summary: test_vf_float_conversions.cpp:63:12: error: expected primary-expression befor...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2014-12-02 18:38 UTC by Vinson Lee
Modified: 2016-07-09 00:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2014-12-02 18:38:16 UTC
mesa: 4e6244e80f7dd6dad526ff04f5103ed24d61d38a (master 10.5.0-devel)

$ make check
[...]
  CXX    test_vf_float_conversions.o
test_vf_float_conversions.cpp: In function ‘unsigned int f2u(float)’:
test_vf_float_conversions.cpp:63:12: error: expected primary-expression before ‘union’
test_vf_float_conversions.cpp:63:12: error: expected ‘)’ before ‘union’
test_vf_float_conversions.cpp:64:1: warning: control reaches end of non-void function [-Wreturn-type]


$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


commit b2abf033e06f3085e84dd039a7d84132c74a69b5
Author: Matt Turner <mattst88@gmail.com>
Date:   Fri Oct 24 11:42:21 2014 -0700

    i965: Add unit test for float <-> VF conversions.
    
    Using Eric's original VF -> float conversion code to initialize the
    table.
Comment 1 Matt Turner 2014-12-02 18:48:13 UTC
I think this was fixed yesterday by

http://cgit.freedesktop.org/mesa/mesa/commit/?id=31a46fb7a5063b7d292acbefb89138ee25b2673e
Comment 2 Vinson Lee 2014-12-02 18:51:27 UTC
Still not fixed with top-of-tree master.
Comment 3 Vinson Lee 2014-12-09 05:46:08 UTC
commit d20235f79a4b2786c984175b502b97ac73648781
Author: Vinson Lee <vlee@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@freedesktop.org>
    Reviewed-by: Matt Turner <mattst88@gmail.com>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.