zero-width bit-field
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@4020 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
This commit is contained in:
parent
9a528e2820
commit
2e2c52d62d
|
@ -22,6 +22,15 @@ struct S2
|
|||
|
||||
STATIC_ASSERT(sizeof(struct S2)==sizeof(char));
|
||||
|
||||
struct S3
|
||||
{
|
||||
char my_bit : 1;
|
||||
int : 0; // zero width, causes padding to alignment of int
|
||||
char other;
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(struct S3)==sizeof(int)+sizeof(char));
|
||||
|
||||
int main()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue