projects
/
cparser
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
some testcases I had lying around here
[cparser]
/
parsetest
/
bitfield2.c
1
struct x {
2
unsigned x1:1;
3
unsigned x2:2;
4
unsigned x3:3;
5
unsigned x4:4;
6
};
7
8
void foobar (int x, int y, int z)
9
{
10
struct x a = {x, y, z, 7};
11
struct x b = {x, y, z, 3};
12
struct x *c = &b;
13
14
c->x3 += (a.x2 - a.x1) * c->x2;
15
if (a.x1 != 1 || c->x3 != 5)
16
abort ();
17
exit (0);
18
}
19
20
int main()
21
{
22
foobar (1, 2, 3);
23
}