param_key: fix container of when no struct member is referenced
[smatch.git] / validation / constexpr-cast.c
blob993c46675d86f392b121d0cd04888b56aa762648
1 static int a[] = {
2 [(int)0] = 0, // OK
3 [(int)(int)0] = 0, // OK
4 [(int)0.] = 0, // OK
5 [(int)(int)0.] = 0, // OK
6 [(int)__builtin_choose_expr(0, 0, 0)] = 0, // OK
7 [(int)__builtin_choose_expr(0, 0, 0.)] = 0, // OK
9 [(int)(float)0] = 0, // KO
10 [(int)(float)0.] = 0, // KO
12 [(int)(void*)0] = 0, // KO
13 [(int)(void*)0.] = 0, // KO
17 * check-name: constexprness in casts
19 * check-error-start
20 constexpr-cast.c:9:11: error: bad integer constant expression
21 constexpr-cast.c:10:11: error: bad integer constant expression
22 constexpr-cast.c:12:11: error: bad integer constant expression
23 constexpr-cast.c:13:11: error: bad integer constant expression
24 * check-error-end