public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/19531] NRV is performed on volatile temporary
Date: Sun, 23 Sep 2007 17:13:00 -0000	[thread overview]
Message-ID: <20070923171302.19477.qmail@sourceware.org> (raw)
In-Reply-To: <bug-19531-9958@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from bangerth at dealii dot org  2007-09-23 17:13 -------
Confirmed indeed. Core DR 20 added the following text to 12.8/15:

  This  elision  of  copy  operations  is  permitted  in  the  following
  circumstances (which may be combined to eliminate multiple copies):

  --  in a return statement in a function with a class return type, when
      the expression is the name of a non-volatile automatic object with
      the same cv-unqualified type as the function return type, the copy
      operation  can  be  omitted  by  constructing the automatic object
      directly into the function's return value

Note that the return expression is specifically restricted to the name of 
a *non-volatile automatic object*.

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19531


  parent reply	other threads:[~2007-09-23 17:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-19531-9958@http.gcc.gnu.org/bugzilla/>
2007-09-23 12:26 ` rguenth at gcc dot gnu dot org
2007-09-23 17:13 ` bangerth at dealii dot org [this message]
2007-09-24  7:10 ` chrbr at gcc dot gnu dot org
2007-09-24  7:15 ` chrbr at gcc dot gnu dot org
2007-10-08 11:03 ` chrbr at gcc dot gnu dot org
2007-10-31  7:56 ` chrbr at gcc dot gnu dot org
2007-10-31  8:01 ` chrbr at gcc dot gnu dot org
2005-01-19 15:31 [Bug c++/19531] New: RVO " christian dot bruel at st dot com
2005-01-19 15:38 ` [Bug c++/19531] NRV " pinskia at gcc dot gnu dot org
2005-03-05 23:29 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070923171302.19477.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).