This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++.old-deja/g++.mike/p7325.C - suspected bogus test case
- From: Mike Stump <mrs at apple dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Zack Weinberg <zack at codesourcery dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 29 Jun 2004 07:12:40 -0700
- Subject: Re: g++.old-deja/g++.mike/p7325.C - suspected bogus test case
On Saturday, June 26, 2004, at 11:25 AM, Mark Mitchell wrote:
Why do you expect that? Independently of whether or not their
addresses have been taken, the language says these temporaries go away
at a particular point.
Bingo. And because they go away, any attempt by the user code to
extend them should result in a warning saying that the address escapes
the objects lifetime. (If you like warnings of that sort from the
optimizer.)