source: tests/zombies/Initialization2.c @ 474d610

arm-ehjacob/cs343-translationnew-ast-unique-expr
Last change on this file since 474d610 was 87b9332, checked in by Andrew Beach <ajbeach@…>, 13 months ago

Moved 'examples/' to 'tests/zombies/'.

  • Property mode set to 100644
File size: 862 bytes
Line 
1int a = 3;
2struct { int x; int y; } z = { 3, 7 };      /* OK */
3struct { int x; int y; } z1 = { .[x,y]:3 }; /* OK */
4struct { int x; int y; } z2 = { y:3, x:4 }; /* OK */
5struct { int x; struct { int y1; int y2; } y; } z3 = { x:3, y:{y1:4, y2:5} };  /* OK */
6struct { int x; struct { int y1; int y2; } y; } z3 = { y:{y2:9, y1:8}, x:7 };  /* OK */
7struct { int x; struct { int y1; int y2; } y; } z3 = { x:7, {y2:9, y1:8} };  /* OK */
8struct { 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 };
13struct t { int a, b; };
14struct t x = { b:4, a:3 };
15struct { int x; int y; } z6= {5,6,4};  /* (should be an) error */
Note: See TracBrowser for help on using the repository browser.