ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
deferred_resn
demangler
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
resolv-new
with_gc
Last change
on this file since dc86541 was ca26509, checked in by Peter A. Buhr <pabuhr@…>, 9 years ago |
relocate and delete example programs under Test directory to test/examples directories
|
-
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.