mention NRVO
authorJason Merrill <jason@gcc.gnu.org>
Mon, 11 Feb 2002 15:24:37 +0000 (10:24 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 11 Feb 2002 15:24:37 +0000 (10:24 -0500)
From-SVN: r49677

gcc/cp/NEWS

index a55b484491a113bbd5215641b0f70667c8427287..869ba057b2d145b6fc53080563c2d20b0158a060 100644 (file)
   any cleanup for that parameter is performed in the caller, as specified
   by the ia64 C++ ABI, rather than the called function as before.
 
+* G++ now supports the "named return value optimization":  for code like
+
+    A f () {
+      A a;
+      ...
+      return a;
+    }
+
+  G++ will allocate 'a' in the return value slot, so that the return
+  becomes a no-op.  For this to work, all return statements in the function
+  must return the same variable.
+
 *** Changes in GCC 3.0:
 
 * Support for guiding declarations has been removed.