diff options
Diffstat (limited to 'validation/backend')
| -rw-r--r-- | validation/backend/compare-with-null.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/validation/backend/compare-with-null.c b/validation/backend/compare-with-null.c new file mode 100644 index 00000000..e23562bc --- /dev/null +++ b/validation/backend/compare-with-null.c @@ -0,0 +1,12 @@ +int tstv(void *p) { return !p; } +int cmpv(void *p) { return p == ((void*)0); } + +int tsti(int *p) { return !p; } +int cmpi(int *p) { return p == ((int *)0); } +int cmpx(int *p) { return p == ((void*)0); } + +/* + * check-name: compare-with-null + * check-command: sparsec -Wno-decl -c $file -o tmp.o + * check-output-ignore + */ |
