From: Christoph Mallon Date: Fri, 18 Feb 2011 21:05:10 +0000 (+0000) Subject: Correct logic in is_error_entity(). X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;ds=sidebyside;h=37f1ce3da5d6b4d308af26d117805fa8b357e277;p=cparser Correct logic in is_error_entity(). This fixes C/should_fail/typedef_enum.c. [r28418] --- 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; }