From: Christoph Mallon Date: Sun, 19 Oct 2008 17:25:56 +0000 (+0000) Subject: Fix r23014. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=5edbd611f27250a530b046d919ba6386c5fe2604;p=cparser Fix r23014. [r23015] --- diff --git a/parser.c b/parser.c index 6ebfe2e..4b4c914 100644 --- a/parser.c +++ b/parser.c @@ -7380,9 +7380,11 @@ static expression_t *parse_conditional_expression(unsigned precedence, warningf(&conditional->base.source_position, "pointer/integer type mismatch in conditional expression ('%T' and '%T')", true_type, false_type); result_type = pointer_type; - } else if (is_type_valid(other_type)) { - type_error_incompatible("while parsing conditional", - &expression->base.source_position, true_type, false_type); + } else { + if (is_type_valid(other_type)) { + type_error_incompatible("while parsing conditional", + &expression->base.source_position, true_type, false_type); + } result_type = type_error_type; } } else {