Chris Lattner | e66218b | 2006-08-12 17:19:28 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only %s |
2 | |||||
3 | void 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 | |||||
15 | int test2(int a, int b) { | ||||
16 | return a ? a,b : a; | ||||
17 | } | ||||
18 | |||||
19 | int test3(int a, int b) { | ||||
20 | return a = b = c; | ||||
21 | } |