[Bug c++/26671] [4.0/4.1/4.2 Regression] Missing "warning: reference to local variable returned"

pluto at agmk dot net gcc-bugzilla@gcc.gnu.org
Wed Jun 28 09:52:00 GMT 2006



------- 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



More information about the Gcc-bugs mailing list