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] New: map iterators under _GLIBCXX_DEBUG diverge Date: Mon, 18 Aug 2014 12:53:00 -0000 [thread overview] Message-ID: <bug-62169-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169 Bug ID: 62169 Summary: map iterators under _GLIBCXX_DEBUG diverge Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org The two types std::map<int,int>::iterator std::map<const int,int>::iterator are the same when compiled normally, but different under _GLIBCXX_DEBUG. I actually don't know if the standard allows that, but if it does and the difference is intentional, then the documentation ought to mention it. welinder@sherwood:~> cat iterator.C #include <iostream> #include <map> static int foo (const void *) { return 0; } static int foo (std::map<int,int>::iterator *) { return 1; } int main () { std::cerr << foo (static_cast<std::map<const int,int>::iterator *> (0)) << std::endl; return 0; } welinder@sherwood:~> g++ iterator.C welinder@sherwood:~> ./a.out 1 welinder@sherwood:~> g++ -D_GLIBCXX_DEBUG iterator.C welinder@sherwood:~> ./a.out 0 welinder@sherwood:~> g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/lto-wrapper Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --program-suffix=-4.8 --enable-linux-futex --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux Thread model: posix gcc version 4.8.1 20130909 [gcc-4_8-branch revision 202388] (SUSE Linux) (Preprocessed versions coming up, just in case.)
next reply other threads:[~2014-08-18 12:53 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-08-18 12:53 terra at gnome dot org [this message] 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 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@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: linkBe 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).