This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
new warnings from basic_string
- From: larsbj at gullik dot net (Lars Gullik Bjønnes)
- To: libstdc++ at gcc dot gnu dot org
- Date: Thu, 27 Jan 2005 11:26:06 +0100
- Subject: new warnings from basic_string
- Organization: LyX Developer http://www.lyx.org/
I am not sure if this is known, or if it is something others see as
well.
I recently began getting messages about "control may reach end of
non-void function". Is this known or should I put it in bugzilla?
Code:
#include <boost/lexical_cast.hpp>
#include <string>
std::string convert(int f)
{
return boost::lexical_cast<std::string>(f);
}
Compiled with:
g++ -W -Wall -O -c -o convert convert.C
Gives:
/opt/gcc-head/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/basic_string.h:
In function #Target boost::lexical_cast(Source) [with Target =
std::string, Source = int]#:
/opt/gcc-head/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/basic_string.h:2029:
warning: control may reach end of non-void function #_CharT*
std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_refdata() [with
_CharT = char, _Traits = std::char_traits<char>, _Alloc =
std::allocator<char>]# being inlined
--
Lgb