This is the mail archive of the 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

Ian Lance Taylor <> writes:

| I don't see any warning for
| #define _GLIBCXX_DEBUG 1
| #include <map>
| void foo()
| {
|         typedef std::map<int, int> MangledMap;
|         MangledMap mangledNames;
|         MangledMap::const_iterator it = mangledNames.find(0);
| }
| with or without -fno-exceptions, with -O0, -O1, -O2, -O3.

With current cvs I still see a problem (no messages from the previous
test case anymore):

The snippet must be compiled with optimization and no-exceptions

g++ -W -Wall -O -fno-exceptions -c -o test2 test2.C

#include <string>
#include <vector>

void foo(std::vector<std::string> & matches)
        char * buf[10];
        matches.insert(matches.end(), buf, buf + 10);

warning: control may reach end of non-void function #_ForwardIterator
std::__uninitialized_copy_aux(_InputIterator, _InputIterator,
_ForwardIterator, __false_type) [with _InputIterator = std::string*,
_ForwardIterator = std::string*]# being inlined

I have no idea if this is till PR 16558 and if that should be
reopened. Should I create a new PR for this case?


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