summaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>1994-05-13 00:19:57 +0000
committerMike Stump <mrs@gcc.gnu.org>1994-05-13 00:19:57 +0000
commit5dab5552a1f1e1a025b47ff2732e1ddaa6febae0 (patch)
tree3f07160e300eeeba7a188bb0fe8b6d16a89335b0 /gcc/calls.c
parent51b8fc2c697ae80971166d44acd18a1cb2c0d19b (diff)
downloadgcc-5dab5552a1f1e1a025b47ff2732e1ddaa6febae0.tar.gz
calls.c (expand_call): Only destroy temporaries at the end of function calls, if flag_short_temps is set.
* calls.c (expand_call): Only destroy temporaries at the end of function calls, if flag_short_temps is set. * expr.c (safe_from_p, expand_expr): Handle CLEANUP_POINT_EXPRs. * expr.c (expand_expr): Improve handling of temporaries inside COND_EXPRs, cures call to sorry. * expr.c (defer_cleanups_to): New routine to handle the deferral of cleanups. * flags.h (flag_short_temps): New flag, to allow better control over the lifetime of temporaries. * toplev.c (flag_short_temps, lang_options): Ditto. * tree.def (CLEANUP_POINT_EXPR): Add, to allow better control over the lifetime of temporaries. From-SVN: r7289
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index 99c8a602bbb..cc6a74a5668 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1995,9 +1995,12 @@ expand_call (exp, target, ignore)
}
#endif
- /* Perform all cleanups needed for the arguments of this call
- (i.e. destructors in C++). */
- expand_cleanups_to (old_cleanups);
+ if (flag_short_temps)
+ {
+ /* Perform all cleanups needed for the arguments of this call
+ (i.e. destructors in C++). */
+ expand_cleanups_to (old_cleanups);
+ }
/* If size of args is variable or this was a constructor call for a stack
argument, restore saved stack-pointer value. */