2006-08-13 01:19:28 +08:00
|
|
|
// RUN: clang -fsyntax-only %s
|
|
|
|
|
|
|
|
void test1() {
|
|
|
|
if (sizeof (int){ 1}); // sizeof compound literal
|
|
|
|
if (sizeof (int)); // sizeof type
|
|
|
|
|
|
|
|
(int)4; // cast.
|
|
|
|
(int){4}; // compound literal.
|
|
|
|
|
|
|
|
// FIXME: change this to the struct version when we can.
|
|
|
|
//int A = (struct{ int a;}){ 1}.a;
|
|
|
|
int A = (int){ 1}.a;
|
|
|
|
}
|
|
|
|
|
|
|
|
int test2(int a, int b) {
|
|
|
|
return a ? a,b : a;
|
|
|
|
}
|
|
|
|
|
2006-08-13 02:11:24 +08:00
|
|
|
int test3(int a, int b, int c) {
|
2006-08-13 01:19:28 +08:00
|
|
|
return a = b = c;
|
|
|
|
}
|
2006-08-13 02:11:24 +08:00
|
|
|
|
|
|
|
int test4() {
|
|
|
|
test4();
|
|
|
|
}
|