From a0150688f38afcdef189636afa774100cbc16d74 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 19 Dec 2012 17:55:19 +0100 Subject: [PATCH] fix null pointer constants only a cast to void* gives a null pointer constant, casting to types compatible with void* not necessarily. --- parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.c b/parser.c index 95a204f..74374c5 100644 --- a/parser.c +++ b/parser.c @@ -856,7 +856,7 @@ static bool is_null_pointer_constant(const expression_t *expression) /* skip void* cast */ if (expression->kind == EXPR_UNARY_CAST) { type_t *const type = skip_typeref(expression->base.type); - if (types_compatible(type, type_void_ptr)) + if (type == type_void_ptr) expression = expression->unary.value; } -- 2.20.1