This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26671] [4.0/4.1/4.2 Regression] Missing "warning: reference to local variable returned"
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2006 08:56:24 -0000
- Subject: [Bug c++/26671] [4.0/4.1/4.2 Regression] Missing "warning: reference to local variable returned"
- References: <bug-26671-12357@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pluto at agmk dot net 2006-06-28 08:56 -------
following testcase doesn't generate warning in 4.1.2svn.
3.3.6 works fine.
#include <string>
std::string const& foo()
{
std::string tab[ 1 ] = { std::string( "text" ) };
int const idx = 0;
return tab[ idx ];
}
--
pluto at agmk dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26671