<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
It also fixes the errors that I was getting with gcc 5.4.0 with configure build on ubuntu 16.04.
<div class=""><br class="">
</div>
<div class="">Tested-By: George Kyriazis <<a href="mailto:george.kyriazis@intel.com" class="">george.kyriazis@intel.com</a>></div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Feb 25, 2018, at 6:52 PM, Roland Scheidegger <<a href="mailto:sroland@vmware.com" class="">sroland@vmware.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Am
25.02.2018 um 21:12 schrieb Francisco Jerez:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">
Roland Scheidegger <<a href="mailto:sroland@vmware.com" class="">sroland@vmware.com</a>> writes:<br class="">
<br class="">
<blockquote type="cite" class="">Am 25.02.2018 um 03:35 schrieb Francisco Jerez:<br class="">
<blockquote type="cite" class="">Roland Scheidegger <<a href="mailto:sroland@vmware.com" class="">sroland@vmware.com</a>> writes:<br class="">
<br class="">
<blockquote type="cite" class="">This seems to have broken compilation with some gcc versions (with scons<br class="">
build):<br class="">
<br class="">
In file included from src/compiler/glsl/ast_array_index.cpp:24:0:<br class="">
src/compiler/glsl/ast.h:648:16: error: member<br class="">
‘ast_type_qualifier::bitset_t ast_type_qualifier::flags::i’ with<br class="">
constructor not allowed in union<br class="">
bitset_t i;<br class="">
^<br class="">
</blockquote>
<br class="">
Oops... And the only reason bitset_t has a default constructor was...<br class="">
to avoid using another C++11 feature (defaulted member functions).<br class="">
Does the attached patch fix the build failure for you? The cleaner<br class="">
alternative would be to define the default constructor of the bitset<br class="">
object like 'T() = default', but that would imply dropping support for<br class="">
GCC 4.2-4.3 which don't implement the feature...<br class="">
</blockquote>
<br class="">
FWIW the compile error was happening with gcc 4.8 - I didn't see it with<br class="">
gcc 5.4.<br class="">
(I don't think at vmware we'd care about anything older than gcc 4.4 at<br class="">
least but last time someone wanted to bump gcc requirements there were<br class="">
still people requiring gcc 4.2.)<br class="">
<br class="">
The patch compiles albeit there's about two dozen warnings like the<br class="">
following:<br class="">
glsl/ast_type.cpp: In member function 'bool<br class="">
ast_fully_specified_type::has_qualifiers(_mesa_glsl_parse_state*) const':<br class="">
glsl/ast_type.cpp:50:67: warning: ISO C++ says that these are ambiguous,<br class="">
even though the worst conversion for the first is better than the worst<br class="">
conversion for the second: [enabled by default]<br class="">
return (this->qualifier.flags.i & ~subroutine_only.flags.i) != 0;<br class="">
^<br class="">
In file included from glsl/ast.h:31:0,<br class="">
from glsl/ast_type.cpp:24:<br class="">
../../src/util/bitset.h:181:7: note: candidate 1: bool operator!=(const<br class="">
ast_type_qualifier::bitset_t&, unsigned int)<br class="">
operator!=(const T &b, BITSET_WORD x) \<br class="">
^<br class="">
glsl/ast.h:477:4: note: in expansion of macro 'DECLARE_BITSET_T'<br class="">
DECLARE_BITSET_T(bitset_t, 128);<br class="">
^<br class="">
glsl/ast_type.cpp:50:67: note: candidate 2: operator!=(int, int) <built-in><br class="">
return (this->qualifier.flags.i & ~subroutine_only.flags.i) != 0;<br class="">
^<br class="">
Roland<br class="">
<br class="">
</blockquote>
<br class="">
Ah, yeah, that's because I didn't provide overloads for signed integer<br class="">
types, but it should be harmless since the two candidates have the same<br class="">
semantics, and should go away with a C++11-capable compiler. I think<br class="">
the attached patch should shut the warnings on older compilers.<br class="">
</blockquote>
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Yes,
that compiles without warnings (with gcc 4.8)</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Tested-by:
Roland Scheidegger <</span><a href="mailto:sroland@vmware.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">sroland@vmware.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">
<br class="">
<blockquote type="cite" class=""><br class="">
<br class="">
<blockquote type="cite" class=""><br class="">
<blockquote type="cite" class="">src/compiler/glsl/ast.h:648:16: note: unrestricted unions only available<br class="">
with -std=c++11 or -std=gnu++11<br class="">
scons: *** [build/linux-x86_64-checked/compiler/glsl/ast_array_index.os]<br class="">
Error 1<br class="">
src/gallium/tests/unit/u_format_test.c: In function ‘main’:<br class="">
src/gallium/tests/unit/u_format_test.c:649:44: warning: array subscript<br class="">
is above array bounds [-Warray-bounds]<br class="">
unpacked[i][j] = test->unpacked[i][j][1];<br class="">
^<br class="">
In file included from src/compiler/glsl/ast_expr.cpp:24:0:<br class="">
src/compiler/glsl/ast.h:648:16: error: member<br class="">
‘ast_type_qualifier::bitset_t ast_type_qualifier::flags::i’ with<br class="">
constructor not allowed in union<br class="">
bitset_t i;<br class="">
^<br class="">
src/compiler/glsl/ast.h:648:16: note: unrestricted unions only available<br class="">
with -std=c++11 or -std=gnu++11<br class="">
<br class="">
Roland<br class="">
<br class="">
[...]<br class="">
</blockquote>
<br class="">
</blockquote>
</blockquote>
<br class="">
</blockquote>
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">mesa-dev
mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><a href="mailto:mesa-dev@lists.freedesktop.org" class="">mesa-dev@lists.freedesktop.org</a></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" class="">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a></span></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>