util/bitset: Make C++ wrapper trivially constructible.
In order to fix a build failure on compilers not implementing
unrestricted unions, which is a C++11 feature.
v2: Provide signed integer comparison and assignment operators instead
of BITSET_WORD ones to avoid spurious ambiguity warnings on
comparisons with a signed integer literal.
Fixes: ba79a90fb5
"glsl: Switch ast_type_qualifier to a 128-bit bitset."
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105238
Tested-by: Roland Scheidegger <sroland@vmware.com>
Tested-By: George Kyriazis <george.kyriazis@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
@@ -477,8 +477,6 @@ struct ast_type_qualifier {
|
||||
DECLARE_BITSET_T(bitset_t, 128);
|
||||
|
||||
union flags {
|
||||
flags() : i(0) {}
|
||||
|
||||
struct {
|
||||
unsigned invariant:1;
|
||||
unsigned precise:1;
|
||||
|
@@ -96,7 +96,6 @@ static bool match_layout_qualifier(const char *s1, const char *s2,
|
||||
%parse-param {struct _mesa_glsl_parse_state *state}
|
||||
|
||||
%union {
|
||||
YYSTYPE() {}
|
||||
int n;
|
||||
int64_t n64;
|
||||
float real;
|
||||
|
Reference in New Issue
Block a user