]> git.ipfire.org Git - thirdparty/gcc.git/commit
* cp-gimplify.c (cp_gimplify_expr): Use get_initialized_tmp_var.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Oct 2019 19:09:53 +0000 (19:09 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Oct 2019 19:09:53 +0000 (19:09 +0000)
commitf0899489a4299d6270437f8be0d7989d91c44c88
treec5450036b286821b43db98f6d8a071af778b76bf
parentdef2dffb1ef3ba5c2a88679876ce22d2e68232a3
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277128 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/gimplify.c
gcc/gimplify.h
gcc/targhooks.c