gcc/testsuite/gcc.c-torture/compile/20010124-1.c
raw| 1 | /* Origin: testcase from Joseph Myers <[email protected]>, problem pointed |
| 2 | out in a post to comp.std.c |
| 3 | <[email protected]> |
| 4 | by Dibyendu Majumdar <[email protected]>. |
| 5 | Compound literals should be parsed as postfix expressions, rather than |
| 6 | as cast expressions. In particular, they are valid operands of sizeof. */ |
| 7 | |
| 8 | struct s { int a; int b; }; |
| 9 | char x[((sizeof (struct s){ 1, 2 }) == sizeof (struct s)) ? 1 : -1]; |