From 37f1ce3da5d6b4d308af26d117805fa8b357e277 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Fri, 18 Feb 2011 21:05:10 +0000 Subject: [PATCH] Correct logic in is_error_entity(). This fixes C/should_fail/typedef_enum.c. [r28418] --- parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser.c b/parser.c index cd2f037..7e44886 100644 --- a/parser.c +++ b/parser.c @@ -4110,9 +4110,9 @@ static void error_redefined_as_different_kind(const source_position_t *pos, static bool is_error_entity(entity_t *const ent) { if (is_declaration(ent)) { - return is_type_valid(skip_typeref(ent->declaration.type)); + return !is_type_valid(skip_typeref(ent->declaration.type)); } else if (ent->kind == ENTITY_TYPEDEF) { - return is_type_valid(skip_typeref(ent->typedefe.type)); + return !is_type_valid(skip_typeref(ent->typedefe.type)); } return false; } -- 2.20.1