From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: by sourceware.org (Postfix, from userid 2181)
id D42383857825; Thu, 2 Dec 2021 16:53:46 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D42383857825
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"
From: Jonathan Wakely
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r12-5754] libstdc++: Remove broken std::allocator base classes
[PR103340]
X-Act-Checkin: gcc
X-Git-Author: Jonathan Wakely
X-Git-Refname: refs/heads/master
X-Git-Oldrev: b5a568683f71b4a8b1e4e45a43484398e9a66ff2
X-Git-Newrev: e2e98f524fdb80c16e3395f20fee930fbcad5562
Message-Id: <20211202165346.D42383857825@sourceware.org>
Date: Thu, 2 Dec 2021 16:53:46 +0000 (GMT)
X-BeenThere: gcc-cvs@gcc.gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Gcc-cvs mailing list
List-Unsubscribe: ,
List-Archive:
List-Help:
List-Subscribe: ,
X-List-Received-Date: Thu, 02 Dec 2021 16:53:46 -0000
https://gcc.gnu.org/g:e2e98f524fdb80c16e3395f20fee930fbcad5562
commit r12-5754-ge2e98f524fdb80c16e3395f20fee930fbcad5562
Author: Jonathan Wakely
Date: Wed Dec 1 16:30:30 2021 +0000
libstdc++: Remove broken std::allocator base classes [PR103340]
The bitmap_allocator, __mt_alloc and __pool_alloc extensions are no
longer suitable for use as the base class of std::allocator, because
they have not been updated to meet the C++20 requirements. There is a
patch attached to PR 103340 which addresses that, but more work would be
needed to solve the linking errors that occur when the library is
configured to use them.
Using --enable-libstdcxx-allocator=bitmap wouldn't even bootstrap for
the past few years, and I can't find any gcc-testresults reports using
any of these allocators. This patch removes the configure option to use
these as the std::allocator base class. The allocators are still in the
tree and can be used directly, you just can't configure the library to
use one of them as the base class of std::allocator.
libstdc++-v3/ChangeLog:
PR libstdc++/103340
PR libstdc++/103400
PR libstdc++/103381
* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Remove mt, bitmap
and pool options.
* configure: Regenerate.
* config/allocator/bitmap_allocator_base.h: Removed.
* config/allocator/mt_allocator_base.h: Removed.
* config/allocator/pool_allocator_base.h: Removed.
* doc/xml/manual/allocator.xml: Update.
* doc/xml/manual/configure.xml: Update.
* doc/xml/manual/evolution.xml: Document removal.
* doc/xml/manual/mt_allocator.xml: Editorial tweaks.
* doc/html/manual/*: Regenerate.
Diff:
---
libstdc++-v3/acinclude.m4 | 14 +----
.../config/allocator/bitmap_allocator_base.h | 55 ------------------
libstdc++-v3/config/allocator/mt_allocator_base.h | 55 ------------------
.../config/allocator/pool_allocator_base.h | 55 ------------------
libstdc++-v3/configure | 14 +----
libstdc++-v3/doc/html/manual/api.html | 3 +
libstdc++-v3/doc/html/manual/configure.html | 10 ++--
libstdc++-v3/doc/html/manual/memory.html | 57 ++++++------------
libstdc++-v3/doc/html/manual/mt_allocator.html | 8 +--
libstdc++-v3/doc/xml/manual/allocator.xml | 67 +++++++---------------
libstdc++-v3/doc/xml/manual/configure.xml | 10 ++--
libstdc++-v3/doc/xml/manual/evolution.xml | 5 ++
libstdc++-v3/doc/xml/manual/mt_allocator.xml | 8 +--
13 files changed, 64 insertions(+), 297 deletions(-)
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 71321055de7..6d9a8875e31 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -2599,7 +2599,7 @@ AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [
AC_MSG_CHECKING([for std::allocator base class])
GLIBCXX_ENABLE(libstdcxx-allocator,auto,[[[=KIND]]],
[use KIND for target std::allocator base],
- [permit new|malloc|mt|bitmap|pool|yes|no|auto])
+ [permit new|malloc|yes|no|auto])
# If they didn't use this option switch, or if they specified --enable
# with no specific model, we'll have to look for one. If they
@@ -2631,26 +2631,14 @@ AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [
# Set configure bits for specified locale package
case ${enable_libstdcxx_allocator_flag} in
- bitmap)
- ALLOCATOR_H=config/allocator/bitmap_allocator_base.h
- ALLOCATOR_NAME=__gnu_cxx::bitmap_allocator
- ;;
malloc)
ALLOCATOR_H=config/allocator/malloc_allocator_base.h
ALLOCATOR_NAME=__gnu_cxx::malloc_allocator
;;
- mt)
- ALLOCATOR_H=config/allocator/mt_allocator_base.h
- ALLOCATOR_NAME=__gnu_cxx::__mt_alloc
- ;;
new)
ALLOCATOR_H=config/allocator/new_allocator_base.h
ALLOCATOR_NAME=__gnu_cxx::new_allocator
;;
- pool)
- ALLOCATOR_H=config/allocator/pool_allocator_base.h
- ALLOCATOR_NAME=__gnu_cxx::__pool_alloc
- ;;
esac
GLIBCXX_CONDITIONAL(ENABLE_ALLOCATOR_NEW,
diff --git a/libstdc++-v3/config/allocator/bitmap_allocator_base.h b/libstdc++-v3/config/allocator/bitmap_allocator_base.h
deleted file mode 100644
index 40ccbf03449..00000000000
--- a/libstdc++-v3/config/allocator/bitmap_allocator_base.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Base to std::allocator -*- C++ -*-
-
-// Copyright (C) 2004-2021 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// Under Section 7 of GPL version 3, you are granted additional
-// permissions described in the GCC Runtime Library Exception, version
-// 3.1, as published by the Free Software Foundation.
-
-// You should have received a copy of the GNU General Public License and
-// a copy of the GCC Runtime Library Exception along with this program;
-// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-// .
-
-/** @file bits/c++allocator.h
- * This is an internal header file, included by other library headers.
- * Do not attempt to use it directly. @headername{memory}
- */
-
-#ifndef _GLIBCXX_CXX_ALLOCATOR_H
-#define _GLIBCXX_CXX_ALLOCATOR_H 1
-
-#include
-
-#if __cplusplus >= 201103L
-namespace std
-{
- /**
- * @brief An alias to the base class for std::allocator.
- * @ingroup allocators
- *
- * Used to set the std::allocator base class to
- * __gnu_cxx::bitmap_allocator.
- *
- * @tparam _Tp Type of allocated object.
- */
- template
- using __allocator_base = __gnu_cxx::bitmap_allocator<_Tp>;
-}
-#else
-// Define bitmap_allocator as the base class to std::allocator.
-# define __allocator_base __gnu_cxx::bitmap_allocator
-#endif
-
-#endif
diff --git a/libstdc++-v3/config/allocator/mt_allocator_base.h b/libstdc++-v3/config/allocator/mt_allocator_base.h
deleted file mode 100644
index eb45b8dea6d..00000000000
--- a/libstdc++-v3/config/allocator/mt_allocator_base.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Base to std::allocator -*- C++ -*-
-
-// Copyright (C) 2004-2021 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// Under Section 7 of GPL version 3, you are granted additional
-// permissions described in the GCC Runtime Library Exception, version
-// 3.1, as published by the Free Software Foundation.
-
-// You should have received a copy of the GNU General Public License and
-// a copy of the GCC Runtime Library Exception along with this program;
-// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-// .
-
-/** @file bits/c++allocator.h
- * This is an internal header file, included by other library headers.
- * Do not attempt to use it directly. @headername{memory}
- */
-
-#ifndef _GLIBCXX_CXX_ALLOCATOR_H
-#define _GLIBCXX_CXX_ALLOCATOR_H 1
-
-#include
-
-#if __cplusplus >= 201103L
-namespace std
-{
- /**
- * @brief An alias to the base class for std::allocator.
- * @ingroup allocators
- *
- * Used to set the std::allocator base class to
- * __gnu_cxx::__mt_alloc.
- *
- * @tparam _Tp Type of allocated object.
- */
- template
- using __allocator_base = __gnu_cxx::__mt_alloc<_Tp>;
-}
-#else
-// Define __mt_alloc as the base class to std::allocator.
-# define __allocator_base __gnu_cxx::__mt_alloc
-#endif
-
-#endif
diff --git a/libstdc++-v3/config/allocator/pool_allocator_base.h b/libstdc++-v3/config/allocator/pool_allocator_base.h
deleted file mode 100644
index c3ec8ecce8d..00000000000
--- a/libstdc++-v3/config/allocator/pool_allocator_base.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Base to std::allocator -*- C++ -*-
-
-// Copyright (C) 2004-2021 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// Under Section 7 of GPL version 3, you are granted additional
-// permissions described in the GCC Runtime Library Exception, version
-// 3.1, as published by the Free Software Foundation.
-
-// You should have received a copy of the GNU General Public License and
-// a copy of the GCC Runtime Library Exception along with this program;
-// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-// .
-
-/** @file bits/c++allocator.h
- * This is an internal header file, included by other library headers.
- * Do not attempt to use it directly. @headername{memory}
- */
-
-#ifndef _GLIBCXX_CXX_ALLOCATOR_H
-#define _GLIBCXX_CXX_ALLOCATOR_H 1
-
-#include
-
-#if __cplusplus >= 201103L
-namespace std
-{
- /**
- * @brief An alias to the base class for std::allocator.
- * @ingroup allocators
- *
- * Used to set the std::allocator base class to
- * __gnu_cxx::__pool_alloc.
- *
- * @tparam _Tp Type of allocated object.
- */
- template
- using __allocator_base = __gnu_cxx::__pool_alloc<_Tp>;
-}
-#else
-// Define __pool_alloc as the base class to std::allocator.
-# define __allocator_base __gnu_cxx::__pool_alloc
-#endif
-
-#endif
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 9049e4b9864..61a14a2cb3b 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -16848,7 +16848,7 @@ $as_echo_n "checking for std::allocator base class... " >&6; }
if test "${enable_libstdcxx_allocator+set}" = set; then :
enableval=$enable_libstdcxx_allocator;
case "$enableval" in
- new|malloc|mt|bitmap|pool|yes|no|auto) ;;
+ new|malloc|yes|no|auto) ;;
*) as_fn_error $? "Unknown argument to enable/disable libstdcxx-allocator" "$LINENO" 5 ;;
esac
@@ -16889,26 +16889,14 @@ $as_echo "$enable_libstdcxx_allocator_flag" >&6; }
# Set configure bits for specified locale package
case ${enable_libstdcxx_allocator_flag} in
- bitmap)
- ALLOCATOR_H=config/allocator/bitmap_allocator_base.h
- ALLOCATOR_NAME=__gnu_cxx::bitmap_allocator
- ;;
malloc)
ALLOCATOR_H=config/allocator/malloc_allocator_base.h
ALLOCATOR_NAME=__gnu_cxx::malloc_allocator
;;
- mt)
- ALLOCATOR_H=config/allocator/mt_allocator_base.h
- ALLOCATOR_NAME=__gnu_cxx::__mt_alloc
- ;;
new)
ALLOCATOR_H=config/allocator/new_allocator_base.h
ALLOCATOR_NAME=__gnu_cxx::new_allocator
;;
- pool)
- ALLOCATOR_H=config/allocator/pool_allocator_base.h
- ALLOCATOR_NAME=__gnu_cxx::__pool_alloc
- ;;
esac
diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html
index 32810788bf2..2cc44aed4e3 100644
--- a/libstdc++-v3/doc/html/manual/api.html
+++ b/libstdc++-v3/doc/html/manual/api.html
@@ -444,4 +444,7 @@ can be used instead.
The std::unexpected
function and related typedef and
accessors for the unexpected handler are deprecated for C++11 and later.
Dynamic exception specifications should be replaced with noexcept
.
+
+The bitmap
, mt
, and pool
+options for --enable-libstdcxx-allocator
were removed.