param_key: fix container of when no struct member is referenced
[smatch.git] / validation / constexpr-preop.c
blob3fd5774594366e400a19c91b006c00378991112d
1 static int a[] = {
2 [+0] = 0, // OK
3 [+__builtin_choose_expr(0, 0, 0)] = 0, // OK
4 [+0.] = 0, // KO
5 [+__builtin_choose_expr(0, 0, 0.)] = 0, // KO
6 [-0] = 0, // OK
7 [-__builtin_choose_expr(0, 0, 0)] = 0, // OK
8 [-0.] = 0, // KO
9 [-__builtin_choose_expr(0, 0, 0.)] = 0, // KO
10 [~0] = 0, // OK
11 [~__builtin_choose_expr(0, 0, 0)] = 0, // OK
12 [!0] = 0, // OK
13 [!__builtin_choose_expr(0, 0, 0)] = 0, // OK
14 [!0.] = 0, // KO
15 [!__builtin_choose_expr(0, 0, 0.)] = 0, // KO
19 * check-name: constexprness in preops
21 * check-error-start
22 constexpr-preop.c:4:5: error: bad constant expression
23 constexpr-preop.c:5:33: error: bad constant expression
24 constexpr-preop.c:8:4: error: bad constant expression
25 constexpr-preop.c:9:4: error: bad constant expression
26 constexpr-preop.c:14:4: error: bad integer constant expression
27 constexpr-preop.c:15:4: error: bad integer constant expression
28 constexpr-preop.c:10:4: error: index out of bounds in initializer
29 constexpr-preop.c:11:4: error: index out of bounds in initializer
30 * check-error-end