From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21664 invoked by alias); 9 Mar 2008 15:52:36 -0000 Received: (qmail 21045 invoked by uid 48); 9 Mar 2008 15:51:59 -0000 Date: Sun, 09 Mar 2008 15:52:00 -0000 Message-ID: <20080309155159.21044.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/31247] std::vector::iterator::value_type is accessible In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jwakely dot gcc at gmail dot com" 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 X-SW-Source: 2008-03/txt/msg00601.txt.bz2 ------- Comment #7 from jwakely dot gcc at gmail dot com 2008-03-09 15:51 ------- Created an attachment (id=15284) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15284&action=view) make nested iterator typedefs private in debug mode It's "accepts implementation-defined" not "accepts invalid" - and it's obviously by design that GCC accepts its own implementation-defined constructs! This patch makes the typedefs inaccessible in debug mode and fixes up a couple of functions that refer to them directly, rather than through iterator_traits. Tested x86_64/linux. I also tried testing with -D_GLIBCXX_DEBUG added to testsuite_flags but got lots of spurious failures that I don't think are related to this change (as with parallel mode testing, all the 23_containers/*/synopsis.cc tests fail in debug mode - I haven't investigated why) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31247