Last change
on this file since fa5e1aa5 was
87b9332,
checked in by Andrew Beach <ajbeach@…>, 4 years ago
|
Moved 'examples/' to 'tests/zombies/'.
|
-
Property mode set to
100644
|
File size:
862 bytes
|
Line | |
---|
1 | int a = 3; |
---|
2 | struct { int x; int y; } z = { 3, 7 }; /* OK */ |
---|
3 | struct { int x; int y; } z1 = { .[x,y]:3 }; /* OK */ |
---|
4 | struct { int x; int y; } z2 = { y:3, x:4 }; /* OK */ |
---|
5 | struct { int x; struct { int y1; int y2; } y; } z3 = { x:3, y:{y1:4, y2:5} }; /* OK */ |
---|
6 | struct { int x; struct { int y1; int y2; } y; } z3 = { y:{y2:9, y1:8}, x:7 }; /* OK */ |
---|
7 | struct { int x; struct { int y1; int y2; } y; } z3 = { x:7, {y2:9, y1:8} }; /* OK */ |
---|
8 | struct { int x; struct { int y1; int y2; } y; } z3 = { 3, {4, 5} }; /* OK */ |
---|
9 | //struct { int x; struct { int y1; int y2; } } z3 = {4, {5,6}}; |
---|
10 | //struct { int x; struct { int y1; int y2; } y; } z4 = { y:{4,5}, a:3 }; |
---|
11 | //struct { int x; struct { int y1; int y2; } y; } z5 = { a:3, {4,5}}; |
---|
12 | //int x[20] = { [10]: 4 }; |
---|
13 | struct t { int a, b; }; |
---|
14 | struct t x = { b:4, a:3 }; |
---|
15 | struct { int x; int y; } z6= {5,6,4}; /* (should be an) error */ |
---|
Note: See
TracBrowser
for help on using the repository browser.