Print this page
new smatch

*** 7,17 **** int *c = &(int){ *a }; // OK static int *d = &(int){ 1 }; // KO } /* ! * check-name: compound literal address constness verification * check-command: sparse -Wconstexpr-not-const $file * * check-error-start constexpr-compound-literal.c:2:25: warning: non-constant initializer for static object constexpr-compound-literal.c:8:27: warning: non-constant initializer for static object --- 7,17 ---- int *c = &(int){ *a }; // OK static int *d = &(int){ 1 }; // KO } /* ! * check-name: constexpr compound literal address * check-command: sparse -Wconstexpr-not-const $file * * check-error-start constexpr-compound-literal.c:2:25: warning: non-constant initializer for static object constexpr-compound-literal.c:8:27: warning: non-constant initializer for static object