aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/convert.cc12
-rw-r--r--gcc/objc/objc-gnu-runtime-abi-01.cc3
-rw-r--r--gcc/objc/objc-next-runtime-abi-01.cc3
-rw-r--r--gcc/objc/objc-next-runtime-abi-02.cc3
4 files changed, 15 insertions, 6 deletions
diff --git a/gcc/convert.cc b/gcc/convert.cc
index 5357609..ac6af70 100644
--- a/gcc/convert.cc
+++ b/gcc/convert.cc
@@ -96,7 +96,7 @@ convert_to_pointer_1 (tree type, tree expr, bool fold_p)
default:
error ("cannot convert to a pointer type");
- return convert_to_pointer_1 (type, integer_zero_node, fold_p);
+ return error_mark_node;
}
}
@@ -332,11 +332,11 @@ convert_to_real_1 (tree type, tree expr, bool fold_p)
case POINTER_TYPE:
case REFERENCE_TYPE:
error ("pointer value used where a floating-point was expected");
- return convert_to_real_1 (type, integer_zero_node, fold_p);
+ return error_mark_node;
default:
error ("aggregate value used where a floating-point was expected");
- return convert_to_real_1 (type, integer_zero_node, fold_p);
+ return error_mark_node;
}
}
@@ -959,7 +959,7 @@ convert_to_integer_1 (tree type, tree expr, bool dofold)
default:
error ("aggregate value used where an integer was expected");
- return convert (type, integer_zero_node);
+ return error_mark_node;
}
}
@@ -1053,11 +1053,11 @@ convert_to_complex_1 (tree type, tree expr, bool fold_p)
case POINTER_TYPE:
case REFERENCE_TYPE:
error ("pointer value used where a complex was expected");
- return convert_to_complex_1 (type, integer_zero_node, fold_p);
+ return error_mark_node;
default:
error ("aggregate value used where a complex was expected");
- return convert_to_complex_1 (type, integer_zero_node, fold_p);
+ return error_mark_node;
}
}
diff --git a/gcc/objc/objc-gnu-runtime-abi-01.cc b/gcc/objc/objc-gnu-runtime-abi-01.cc
index fbf8307..6f45283 100644
--- a/gcc/objc/objc-gnu-runtime-abi-01.cc
+++ b/gcc/objc/objc-gnu-runtime-abi-01.cc
@@ -700,6 +700,9 @@ build_objc_method_call (location_t loc, int super_flag, tree method_prototype,
lookup_object = build_c_cast (loc, rcv_p, lookup_object);
+ if (error_operand_p (lookup_object))
+ return error_mark_node;
+
/* Use SAVE_EXPR to avoid evaluating the receiver twice. */
lookup_object = save_expr (lookup_object);
diff --git a/gcc/objc/objc-next-runtime-abi-01.cc b/gcc/objc/objc-next-runtime-abi-01.cc
index 70ab5262..9e28976 100644
--- a/gcc/objc/objc-next-runtime-abi-01.cc
+++ b/gcc/objc/objc-next-runtime-abi-01.cc
@@ -846,6 +846,9 @@ build_objc_method_call (location_t loc, int super_flag, tree method_prototype,
lookup_object = build_c_cast (loc, rcv_p, lookup_object);
+ if (error_operand_p (lookup_object))
+ return error_mark_node;
+
/* Use SAVE_EXPR to avoid evaluating the receiver twice. */
lookup_object = save_expr (lookup_object);
diff --git a/gcc/objc/objc-next-runtime-abi-02.cc b/gcc/objc/objc-next-runtime-abi-02.cc
index 6548c00..723b47c 100644
--- a/gcc/objc/objc-next-runtime-abi-02.cc
+++ b/gcc/objc/objc-next-runtime-abi-02.cc
@@ -1729,6 +1729,9 @@ build_v2_build_objc_method_call (int super, tree method_prototype,
lookup_object = build_c_cast (loc, rcv_p, lookup_object);
+ if (error_operand_p (lookup_object))
+ return error_mark_node;
+
/* Use SAVE_EXPR to avoid evaluating the receiver twice. */
lookup_object = save_expr (lookup_object);