Fix r23014.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 19 Oct 2008 17:25:56 +0000 (17:25 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 19 Oct 2008 17:25:56 +0000 (17:25 +0000)
[r23015]

parser.c

index 6ebfe2e..4b4c914 100644 (file)
--- 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 {