aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/evaluate.c
diff options
Diffstat (limited to 'evaluate.c')
-rw-r--r--evaluate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/evaluate.c b/evaluate.c
index 59b3d32e..e44426bd 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -812,7 +812,7 @@ static int is_null_ptr(struct expression *expr)
{
if (expr->type != EXPR_VALUE || expr->value)
return 0;
- if (!is_ptr_type(expr->ctype))
+ if (Wnon_pointer_null && !is_ptr_type(expr->ctype))
warning(expr->pos, "Using plain integer as NULL pointer");
return 1;
}