Bug 78403 - query_renderer_implementation_unittest.cpp:144:4: error: expected primary-expression before ‘.’ token
Summary: query_renderer_implementation_unittest.cpp:144:4: error: expected primary-exp...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium blocker
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-05-07 19:49 UTC by Vinson Lee
Modified: 2014-05-10 01:12 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
glx/tests: Partially revert commit 51e3569573a7b3f8da0df093836761003fcdc414 (1.35 KB, patch)
2014-05-07 21:40 UTC, Emil Velikov
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2014-05-07 19:49:12 UTC
mesa: 9ced3fc649ec04710a5f5c855bfb582b898cff83 (master 10.3.0-devel)

$ make check
[...]
  CXX    query_renderer_implementation_unittest.o
query_renderer_implementation_unittest.cpp:144:4: error: expected primary-expression before ‘.’ token
query_renderer_implementation_unittest.cpp:144:39: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
query_renderer_implementation_unittest.cpp:146:4: error: expected primary-expression before ‘.’ token
query_renderer_implementation_unittest.cpp:147:4: error: expected primary-expression before ‘.’ token

$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 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 51e3569573a7b3f8da0df093836761003fcdc414
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Wed Feb 12 21:00:02 2014 +0000

    glx/tests: explicitly set __DRI2rendererQueryExtension members
    
    While we're here use the typcast'ed name and constify.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Comment 1 Emil Velikov 2014-05-07 21:40:43 UTC
Created attachment 98641 [details] [review]
glx/tests: Partially revert commit 51e3569573a7b3f8da0df093836761003fcdc414

Vinson, did you receive the email with a test request wrt this commit/the whole series ? I was hoping it we could minimize the amount of with such annoying/trivial issues :)

With that said, a quick look at the C++ standard indicates that the patch is not strictly legal and to make things better, gcc 4.9.0 builds this code like a charm.

Just revert the offending hunk.
Comment 2 Vinson Lee 2014-05-09 18:40:19 UTC
Verified attachment 98641 [details] [review] fixes the build error.

Tested-by: Vinson Lee <vlee@freedesktop.org>
Comment 3 Emil Velikov 2014-05-10 01:12:04 UTC
Pushed to master

commit 326b8e253e5ee2e09e54ad46d8370a6e8c8d46da
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Wed May 7 22:30:43 2014 +0100

    glx/tests: Partially revert commit 51e3569573a7b3f8da0df093836761003fcdc414
    
    C++ does not support designated initializers, thus compilation
    is not guaranteed to succeed. Surprisingly gcc 4.6.3 fails to
    build the code, while version 4.9.0 compiles it without a hitch.
    
    Cc: "10.2" <mesa-stable@lists.freedesktop.org>


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