aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/c/c-typeck.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index bd25eca..35b3de4 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-20 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/71601
+ * c-typeck.c (build_conditional_expr): Return error_mark_node if
+ c_common_type returns error_mark_node.
+
2016-06-19 Martin Sebor <msebor@redhat.com>
PR c/69507
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index f03c07b..7c6241c 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -4846,6 +4846,8 @@ build_conditional_expr (location_t colon_loc, tree ifexp, bool ifexp_bcp,
|| code2 == COMPLEX_TYPE))
{
result_type = c_common_type (type1, type2);
+ if (result_type == error_mark_node)
+ return error_mark_node;
do_warn_double_promotion (result_type, type1, type2,
"implicit conversion from %qT to %qT to "
"match other result of conditional",