This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: new warnings from basic_string


larsbj@gullik.net (Lars Gullik Bjønnes) writes:

| I will try to find a small example that shows this.

Seems that _GLIBCXX_DEBUG is now required to trigger it.


#define _GLIBCXX_DEBUG 1

#include <map>

void foo()
{
        typedef std::map<int, int> MangledMap;
        MangledMap mangledNames;
        MangledMap::const_iterator it = mangledNames.find(0);
}


Gives me stuff like:
/opt/gcc-head/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/debug/formatter.h:
In function #bool __gnu_debug::operator==(const
__gnu_debug::_Safe_iterator<_Iterator, _Sequence>&, const
__gnu_debug::_Safe_iterator<_Iterator, _Sequence>&) [with _Iterator =
std::_Rb_tree_iterator<std::pair<const int, int> >, _Sequence =
__gnu_debug_def::map<int, int, std::less<int>,
std::allocator<std::pair<const int, int> > >]#:
/opt/gcc-head/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/debug/formatter.h:227:
warning: control may reach end of non-void function #bool
__gnu_debug::_Safe_iterator<_Iterator, _Sequence>::_M_is_begin() const
[with _Iterator = std::_Rb_tree_iterator<std::pair<const int, int> >,
_Sequence = __gnu_debug_def::map<int, int, std::less<int>,
std::allocator<std::pair<const int, int> > >]# being inlined


-- 
	Lgb


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