aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-10-17 15:09:53 -0400
committerJason Merrill <jason@gcc.gnu.org>2019-10-17 15:09:53 -0400
commit8e5993e236a50ffc161dd45d1ef3ab86133e3363 (patch)
treec5450036b286821b43db98f6d8a071af778b76bf /gcc/gimplify.h
parentc11cccc0285f02f117a1e80924fb7673b6486ce9 (diff)
downloadgcc-8e5993e236a50ffc161dd45d1ef3ab86133e3363.zip
gcc-8e5993e236a50ffc161dd45d1ef3ab86133e3363.tar.gz
gcc-8e5993e236a50ffc161dd45d1ef3ab86133e3363.tar.bz2
cp-gimplify.c (cp_gimplify_expr): Use get_initialized_tmp_var.
* cp-gimplify.c (cp_gimplify_expr): Use get_initialized_tmp_var. The comment for get_formal_tmp_var says that it shouldn't be used for expressions whose value might change between initialization and use, and in this case we're creating a temporary precisely because the value might change, so we should use get_initialized_tmp_var instead. I also noticed that many callers of get_initialized_tmp_var pass NULL for post_p, so it seems appropriate to make it a default argument. gcc/ * gimplify.h (get_initialized_tmp_var): Add default argument to post_p. * gimplify.c (gimplify_self_mod_expr, gimplify_omp_atomic): Remove NULL post_p argument. * targhooks (std_gimplify_va_arg_expr): Likewise. From-SVN: r277128
Diffstat (limited to 'gcc/gimplify.h')
-rw-r--r--gcc/gimplify.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimplify.h b/gcc/gimplify.h
index 1070006..6c997a7 100644
--- a/gcc/gimplify.h
+++ b/gcc/gimplify.h
@@ -57,7 +57,7 @@ extern gbind *gimple_current_bind_expr (void);
extern vec<gbind *> gimple_bind_expr_stack (void);
extern void gimplify_and_add (tree, gimple_seq *);
extern tree get_formal_tmp_var (tree, gimple_seq *);
-extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq *,
+extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq * = NULL,
bool = true);
extern void declare_vars (tree, gimple *, bool);
extern void gimple_add_tmp_var (tree);