From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28027 invoked by alias); 18 Aug 2014 12:53:54 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28005 invoked by uid 48); 18 Aug 2014 12:53:47 -0000 From: "terra at gnome dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: terra at gnome dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg01191.txt.bz2 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::iterator std::map::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 #include static int foo (const void *) { return 0; } static int foo (std::map::iterator *) { return 1; } int main () { std::cerr << foo (static_cast::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.)