This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]