xref: /illumos-gate/usr/src/tools/smatch/src/validation/constexpr-pointer-cast.c (revision 44bf619d328827ce5eca6833fcd5c69f1592e578)
1 static int *a = (int*)0;	// OK
2 static int b = 0;
3 static int *c = (int*)b;	// KO
4 
5 
6 /*
7  * check-name: integer literal cast to pointer type constness verification.
8  * check-command: sparse -Wconstexpr-not-const $file
9  *
10  * check-error-start
11 constexpr-pointer-cast.c:3:18: warning: non-constant initializer for static object
12  * check-error-end
13  */
14