expressions: make assign_expression() take an op argument
[smatch.git] / validation / constexpr-compound-literal.c
blobd7f21ad7a0ef653b8de1b1a1cd7ccf350002551b
1 static int *a = &(int){ 1 }; // OK
2 static int *b = &(int){ *a }; // KO
4 static void foo(void)
6 int *b = &(int){ 1 }; // OK
7 int *c = &(int){ *a }; // OK
8 static int *d = &(int){ 1 }; // KO
12 * check-name: compound literal address constness verification
13 * check-command: sparse -Wconstexpr-not-const $file
15 * check-error-start
16 constexpr-compound-literal.c:2:25: warning: non-constant initializer for static object
17 constexpr-compound-literal.c:8:27: warning: non-constant initializer for static object
18 * check-error-end