Eli Friedman | 7888b93 | 2008-11-12 09:44:48 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only -verify %s |
2 | |||||
3 | #define EVAL_EXPR(testno, expr) int test##testno = sizeof(struct{char qq[expr];}); | ||||
4 | int x; | ||||
5 | EVAL_EXPR(1, (_Bool)&x) | ||||
6 | EVAL_EXPR(2, (int)(1.0+(double)4)) | ||||
7 | EVAL_EXPR(3, (int)(1.0+(float)4.0)) | ||||
8 | EVAL_EXPR(4, (_Bool)(1 ? (void*)&x : 0)) | ||||
9 | EVAL_EXPR(5, (_Bool)(int[]){0}) | ||||
10 | struct y {int x,y;}; | ||||
11 | EVAL_EXPR(6, (int)(1+(struct y*)0)) | ||||
12 | EVAL_EXPR(7, (int)&((struct y*)0)->y) | ||||
13 | EVAL_EXPR(8, (_Bool)"asdf") |