This is the mail archive of the gcc-patches@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]

Re: Fix some _GLIBCXX_DEBUG pretty printer errors


On 08/03/2018 19:11, Jonathan Wakely wrote:
This caused a new regression for:

   std::forward_list<std::string> flst;
   std::forward_list<std::string>::iterator flstiter0;
// { dg-final { note-test flstiter0 {non-dereferenceable iterator for
std::forward_list}} }


$1 = {_M_node = 0x0}
got: $1 = {_M_node = 0x0}
FAIL: libstdc++-prettyprinters/debug_cxx11.cc print flstiter0

Fixed by the attached patch, committed as trivial.

François

diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index b5f76f2..45aaa12 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -1744,10 +1744,10 @@ def build_libstdcxx_dictionary ():
                                       StdVectorIteratorPrinter)
         libstdcxx_printer.add_version('__gnu_cxx::', '_Slist_iterator',
                                       StdSlistIteratorPrinter)
-        libstdcxx_printer.add_version('__gnu_cxx::', '_Fwd_list_iterator',
-                                      StdFwdListIteratorPrinter)
-        libstdcxx_printer.add_version('__gnu_cxx::', '_Fwd_list_const_iterator',
-                                      StdFwdListIteratorPrinter)
+        libstdcxx_printer.add_container('std::', '_Fwd_list_iterator',
+                                        StdFwdListIteratorPrinter)
+        libstdcxx_printer.add_container('std::', '_Fwd_list_const_iterator',
+                                        StdFwdListIteratorPrinter)
 
         # Debug (compiled with -D_GLIBCXX_DEBUG) printer
         # registrations.

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