public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "terra at gnome dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/62169] map iterators under _GLIBCXX_DEBUG diverge
Date: Sun, 24 Aug 2014 00:07:00 -0000	[thread overview]
Message-ID: <bug-62169-4-64pGOo4DWn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-62169-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169

--- Comment #5 from M Welinder <terra at gnome dot org> ---
I agree that anyone depending on map and multimap iterators to mix deserves
whatever happens as a result.  It would, however, be nice g++ would reject such
programs outright.  Currently this is accepted:

    std::map<int,int> foo;
    std::multimap<int,int>::iterator = foo.end();

You get this kind of code when someone changes the container type and uses the
compiler to point out where further fixes are needed.

Is it an option to make the iterators different for the non-debug case too?
Would that be an ABI change?


  parent reply	other threads:[~2014-08-24  0:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18 12:53 [Bug libstdc++/62169] New: " terra at gnome dot org
2014-08-18 12:56 ` [Bug libstdc++/62169] " terra at gnome dot org
2014-08-18 12:56 ` terra at gnome dot org
2014-08-18 13:01 ` terra at gnome dot org
2014-08-23 23:37 ` redi at gcc dot gnu.org
2014-08-24  0:07 ` terra at gnome dot org [this message]
2014-08-24 10:35 ` redi at gcc dot gnu.org
2014-09-19 13:20 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-62169-4-64pGOo4DWn@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).