Print this page
11972 resync smatch
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/smatch/src/validation/constexpr-conditional.c
+++ new/usr/src/tools/smatch/src/validation/constexpr-conditional.c
1 1 static int a[] = {
2 2 [0 ? : 0] = 0, // OK
3 3 [1 ? : 0] = 0, // OK
4 4 [0 ? 0 : 0] = 0, // OK
5 5 [1 ? 0 : 0] = 0, // OK
6 6 [0 ? 0 : __builtin_choose_expr(0, 0, 0)] = 0, // OK
7 7 [1 ? __builtin_choose_expr(0, 0, 0) : 0] = 0, // OK
8 8 [0 ? __builtin_choose_expr(0, 0, 0) : 0] = 0, // OK
9 9 [1 ? 1 : __builtin_choose_expr(0, 0, 0)] = 0, // OK
10 10 [__builtin_choose_expr(0, 0, 0) ? : 0] = 0, // OK
11 11 [__builtin_choose_expr(0, 0, 1) ? : 0] = 0, // OK
12 12 [0. ? : 0] = 0, // KO
13 13 [0 ? 0. : 0] = 0, // KO
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
14 14 [1 ? : 0.] = 0, // KO
15 15 [__builtin_choose_expr(0, 0., 0) ? : 0] = 0, // OK
16 16 [__builtin_choose_expr(0, 0, 0.) ? : 0] = 0, // KO
17 17 [0 ? __builtin_choose_expr(0, 0., 0) : 0] = 0, // OK
18 18 [0 ? __builtin_choose_expr(0, 0, 0.) : 0] = 0, // KO
19 19 [1 ? 0 : __builtin_choose_expr(0, 0., 0)] = 0, // OK
20 20 [1 ? 0 : __builtin_choose_expr(0, 0, 0.)] = 0, // KO
21 21 };
22 22
23 23 /*
24 - * check-name: Expression constness propagation in conditional expressions
24 + * check-name: constexprness in conditionals
25 25 *
26 26 * check-error-start
27 27 constexpr-conditional.c:12:13: error: bad constant expression
28 28 constexpr-conditional.c:13:19: error: bad constant expression
29 29 constexpr-conditional.c:14:12: error: bad constant expression
30 30 constexpr-conditional.c:16:42: error: bad constant expression
31 31 constexpr-conditional.c:18:48: error: bad constant expression
32 32 constexpr-conditional.c:20:14: error: bad constant expression
33 33 * check-error-end
34 34 */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX