This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/31247] std::vector::iterator::value_type is accessible



------- 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


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