fix bitfield with expr
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6286 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
eb387c59fc
commit
a59ceff827
2 changed files with 4 additions and 2 deletions
|
|
@ -9,6 +9,8 @@ struct Foo {
|
||||||
unsigned int f : 1;
|
unsigned int f : 1;
|
||||||
unsigned int : 5;
|
unsigned int : 5;
|
||||||
int z : 15;
|
int z : 15;
|
||||||
|
unsigned int : 8+6;
|
||||||
|
unsigned seq : (sizeof(unsigned)*8 - 6);
|
||||||
};
|
};
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -3448,7 +3448,7 @@ cpp_vend : cpp_const SEMI {
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
anonymous_bitfield : storage_class type COLON NUM_INT SEMI { };
|
anonymous_bitfield : storage_class type COLON expr SEMI { };
|
||||||
|
|
||||||
/* ======================================================================
|
/* ======================================================================
|
||||||
* PRIMITIVES
|
* PRIMITIVES
|
||||||
|
|
@ -3645,7 +3645,7 @@ def_args : EQUAL definetype {
|
||||||
$$.bitfield = 0;
|
$$.bitfield = 0;
|
||||||
$$.throws = 0;
|
$$.throws = 0;
|
||||||
}
|
}
|
||||||
| COLON NUM_INT {
|
| COLON expr {
|
||||||
$$.val = 0;
|
$$.val = 0;
|
||||||
$$.rawval = 0;
|
$$.rawval = 0;
|
||||||
$$.type = 0;
|
$$.type = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue