From 1583c0f0edb051298f7c385182086364c16762ed Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 11 Dec 2008 09:27:54 +0000 Subject: [PATCH] Do not print an error, that the operand of delete does not have pointer type, if it is the error type. [r24511] --- parser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/parser.c b/parser.c index b1dfc6b..c5d3dd8 100644 --- a/parser.c +++ b/parser.c @@ -8434,8 +8434,10 @@ end_error:; type_t *const type = skip_typeref(value->base.type); if (!is_type_pointer(type)) { - errorf(&value->base.source_position, - "operand of delete must have pointer type"); + if (is_type_valid(type)) { + errorf(&value->base.source_position, + "operand of delete must have pointer type"); + } } else if (warning.other && is_type_atomic(skip_typeref(type->pointer.points_to), ATOMIC_TYPE_VOID)) { warningf(&value->base.source_position, -- 2.20.1