aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2002-02-11 10:24:37 -0500
committerJason Merrill <jason@gcc.gnu.org>2002-02-11 10:24:37 -0500
commitd6b2c474747305341ffe3f4c6fdc4f1fee4a47d1 (patch)
tree0c4250ecfa42f44e16d721ca34b9da6156e9c10d /gcc
parent66df7a985f423ee12a75bd1ae0852ad942b925c3 (diff)
downloadgcc-d6b2c474747305341ffe3f4c6fdc4f1fee4a47d1.zip
gcc-d6b2c474747305341ffe3f4c6fdc4f1fee4a47d1.tar.gz
gcc-d6b2c474747305341ffe3f4c6fdc4f1fee4a47d1.tar.bz2
mention NRVO
From-SVN: r49677
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/NEWS12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cp/NEWS b/gcc/cp/NEWS
index a55b484..869ba05 100644
--- a/gcc/cp/NEWS
+++ b/gcc/cp/NEWS
@@ -44,6 +44,18 @@
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.