aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 19279e36462..43f854c4783 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -3678,15 +3678,13 @@ build_vec_delete_1 (tree base, tree maxindex, tree type,
body = integer_zero_node;
/* Outermost wrapper: If pointer is null, punt. */
- tree cond
- = fold_build2_loc (input_location, NE_EXPR, boolean_type_node, base,
- fold_convert (TREE_TYPE (base), nullptr_node));
+ tree cond = build2_loc (input_location, NE_EXPR, boolean_type_node, base,
+ fold_convert (TREE_TYPE (base), nullptr_node));
/* This is a compiler generated comparison, don't emit
e.g. -Wnonnull-compare warning for it. */
- if (TREE_CODE (cond) == NE_EXPR)
- TREE_NO_WARNING (cond) = 1;
- body = fold_build3_loc (input_location, COND_EXPR, void_type_node,
- cond, body, integer_zero_node);
+ TREE_NO_WARNING (cond) = 1;
+ body = build3_loc (input_location, COND_EXPR, void_type_node,
+ cond, body, integer_zero_node);
body = build1 (NOP_EXPR, void_type_node, body);
if (controller)
@@ -4523,9 +4521,8 @@ build_delete (tree otype, tree addr, special_function_kind auto_delete,
{
/* Handle deleting a null pointer. */
warning_sentinel s (warn_address);
- ifexp = fold (cp_build_binary_op (input_location,
- NE_EXPR, addr, nullptr_node,
- complain));
+ ifexp = cp_build_binary_op (input_location, NE_EXPR, addr,
+ nullptr_node, complain);
if (ifexp == error_mark_node)
return error_mark_node;
/* This is a compiler generated comparison, don't emit