public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] Two tiny libstdc++ cleanups
@ 2015-10-03 12:09 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2015-10-03 12:09 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

This fixes some misleading comments (getenv isn't used in those files)
and removes pretty-printer support for experimental::any objects that
use allocators, as the allocator feature was removed from the TS and
dropped in r218709 before it was included in a GCC release.

Tested powerpc64le-linux, committed to trunk.



[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 2381 bytes --]

commit f1c83d9bbd77d4c22b22051b409efbe12968d653
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Sat Oct 3 00:56:55 2015 +0100

    Remove pretty printing for 'any' with allocators
    
    	* python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Remove support
    	for _Manager_alloc.

diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 2d16786..12e732e 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -945,10 +945,6 @@ class StdExpAnyPrinter(SingleObjContainerPrinter):
                 valptr = self.val['_M_storage']['_M_buffer'].address
             elif '::_Manager_external' in mgrname:
                 valptr = self.val['_M_storage']['_M_ptr']
-            elif '::_Manager_alloc' in mgrname:
-                datatype = gdb.lookup_type(mgrname + '::_Data')
-                valptr = self.val['_M_storage']['_M_ptr'].cast(datatype.pointer())
-                valptr = valptr.dereference()['_M_data'].address
             else:
                 raise ValueError("Unknown manager function in std::experimental::any")
             contained_value = valptr.cast(self.contained_type.pointer()).dereference()

commit 934867ab0ab9b2648ce89daa43012bd3c8190e01
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Sat Oct 3 00:49:29 2015 +0100

    Fix comments saying why headers are included
    
    	* src/c++98/locale.cc: Fix comment.
    	* src/c++98/locale_init.cc: Likewise.

diff --git a/libstdc++-v3/src/c++98/locale.cc b/libstdc++-v3/src/c++98/locale.cc
index 1c29a56..3395c93 100644
--- a/libstdc++-v3/src/c++98/locale.cc
+++ b/libstdc++-v3/src/c++98/locale.cc
@@ -23,7 +23,6 @@
 #define _GLIBCXX_USE_CXX11_ABI 1
 #include <clocale>
 #include <cstring>
-#include <cstdlib>     // For getenv
 #include <cctype>
 #include <cwctype>     // For towupper, etc.
 #include <locale>
diff --git a/libstdc++-v3/src/c++98/locale_init.cc b/libstdc++-v3/src/c++98/locale_init.cc
index 0a95b9f..be7fd90 100644
--- a/libstdc++-v3/src/c++98/locale_init.cc
+++ b/libstdc++-v3/src/c++98/locale_init.cc
@@ -23,7 +23,7 @@
 #define _GLIBCXX_USE_CXX11_ABI 1
 #include <clocale>
 #include <cstring>
-#include <cstdlib>     // For getenv, free.
+#include <cstdlib>     // For free.
 #include <cctype>
 #include <cwctype>     // For towupper, etc.
 #include <locale>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-03 12:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-03 12:09 [patch] Two tiny libstdc++ cleanups Jonathan Wakely

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