From: Christoph Mallon Date: Sun, 19 Oct 2008 16:49:14 +0000 (+0000) Subject: Do not generate an error message about incompatible types in ?: if the error type... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=fd61f3b850189130f7b0a0ae806c5241d64d9ecf;p=cparser Do not generate an error message about incompatible types in ?: if the error type is involved. [r23014] --- diff --git a/parser.c b/parser.c index 7526065..6ebfe2e 100644 --- a/parser.c +++ b/parser.c @@ -7380,7 +7380,7 @@ 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 { + } 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;