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: [PATCH] Fix libstdc++/6811

Paolo Carlini <> writes:

| Gabriel Dos Reis wrote:
| >I gave it more thought: maybe one could try instantiating it and
| >pass a flag to GCC to warn about missing return statement.  I don't
| >know how far we can get with that.
| >
| Anyway, I find this very interesting! It seems that many stupid but 
| *very* serious bugs don't get caught 'til you have a testing framework 
| which thorughly instantiates the various classes...
| >| 
| >| Ok for both? (tested x86-linux, as usual)
| >
| >Yes.
| >
| Thanks. Done.
| Could you possibly help a bit with libstdc++/6642?
| Currently we cannot compile the trivial:
| #include <string>
| class MyClass {
| private:
|   std::string s;
|   std::string::iterator it;
| public:
|   unsigned pos() const {
|     return it - s.begin();
|   }
| };
| which mixes a const_iterator and an iterator. The issue is becoming 
| clearer to me (read DR179 and DR280) but I'm not sure which is the best fix.

Well, since DR179 has a Reday status, I think we should implement the
resolution.  However, I propose we be cautious about DR280.

-- Gaby

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