]> gcc.gnu.org Git - gcc.git/commitdiff
stmt.c (expand_return): We have to be careful of cleanups that can be generated when...
authorMike Stump <mrs@gcc.gnu.org>
Thu, 29 Sep 1994 23:43:02 +0000 (23:43 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Thu, 29 Sep 1994 23:43:02 +0000 (23:43 +0000)
        * stmt.c (expand_return): We have to be careful of cleanups that can
        be generated when expanding the return value, as they might otherwise
        wipe out the return value.

From-SVN: r8167

gcc/stmt.c

index 1046ba1f41beafd950b4a595e04b7d28e1853619..c845d30373794b0ed2a4851d1a6492397b2a8158 100644 (file)
@@ -2513,7 +2513,15 @@ expand_return (retval)
     }
 
   /* Are any cleanups needed?  E.g. C++ destructors to be run?  */
+  /* This is not sufficient.  We also need to watch for cleanups of the
+     expression we are about to expand.  Unfortunately, we cannot know
+     if it has cleanups until we expand it, and we want to change how we
+     expand it depending upon if we need cleanups.  We can't win.  */
+#if 0
   cleanups = any_pending_cleanups (1);
+#else
+  cleanups = 1;
+#endif
 
   if (TREE_CODE (retval) == RESULT_DECL)
     retval_rhs = retval;
This page took 0.072604 seconds and 5 git commands to generate.