blob: 77201a80f971c72e1728ec364ad1951977bf8f97 [file] [log] [blame]
Reid Spencer5f016e22007-07-11 17:01:13 +00001// RUN: clang -fsyntax-only %s
2
3void test1() {
4 if (sizeof (int){ 1}); // sizeof compound literal
5 if (sizeof (int)); // sizeof type
6
7 (int)4; // cast.
8 (int){4}; // compound literal.
9
10 // FIXME: change this to the struct version when we can.
11 //int A = (struct{ int a;}){ 1}.a;
12 int A = (int){ 1}.a;
13}
14
15int test2(int a, int b) {
16 return a ? a,b : a;
17}
18
19int test3(int a, int b, int c) {
20 return a = b = c;
21}
22
23int test4() {
24 test4();
25}
26
27int test_offsetof() {
28 // FIXME: change into something that is semantically correct.
29 __builtin_offsetof(int, a.b.c[4][5]);
30}