aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config/abi/pre/gnu.ver
AgeCommit message (Collapse)AuthorFilesLines
2019-01-04Export explicit instantiations for C++17 members of std::stringJonathan Wakely1-1/+23
The C++17 standard added some new members to std::basic_string, which were not previously instantiated in the library. This meant that the extern template declarations had to be disabled for C++17 mode. With this patch the new members are instantiated in the library and so the explicit instantiation declarations can be used for C++17. The new members added by C++2a are still not exported, and so the explicit instantiation declarations are still disabled for C++2a. * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy for const member functions of std::basic_string. (GLIBCXX_3.4.26): Export member functions of std::basic_string added in C++17. * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)): Make non-standard constructor private. [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)): Likewise. * include/bits/basic_string.tcc (std::string, std::wstring): Declare explicit instantiations for C++17 as well as earlier dialects. * src/c++17/Makefile.am: Add new source files. * src/c++17/Makefile.in: Regenerate. * src/c++17/cow-string-inst.cc: New file defining explicit instantiations for basic_string member functions added in C++17. * src/c++17/string-inst.cc: Likewise. From-SVN: r267585
2019-01-04Add allocator-extended copy/move ctors to COW stringJonathan Wakely1-0/+5
Add these constructors from C++11 which were missing from the COW basic_string. Additionally simplify the definitions of the basic_string::reference and basic_string::const_reference types as required by C++11. This allows filesystem::path::string<Allocator>() to be simplified, so that the same code is used for both basic_string implementations. * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended copy/move constructors for old std::basic_string. * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI] (basic_string::reference, basic_string::const_reference): Define as plain references for C++11 and later. (basic_string::basic_string()): Put constructor body outside preprocessor conditional groups. (basic_string::basic_string(basic_string&&)): Move _Alloc_hider instead of copying it. (basic_string::basic_string(const basic_string&, const _Alloc&)): Define. (basic_string::basic_string(basic_string&&, const _Alloc&)): Define. * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special cases for old basic_string. * testsuite/21_strings/basic_string/cons/char/8.cc: Test allocator-extended constructors unconditionally. Add extra members to allocator type when using old string ABI. * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test for old string ABI. * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise. From-SVN: r267584
2019-01-03PR libstdc++/88681 export missing symbolsJonathan Wakely1-0/+3
These new facet functions were added to GCC 5.1 but the versions for the old std::string ABI were never exported from the shared library. PR libstdc++/88681 * config/abi/pre/gnu.ver: Add missing exports. * testsuite/22_locale/collate_byname/88681.cc: New test. * testsuite/22_locale/time_get/get/char/88681.cc: New test. * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test. From-SVN: r267563
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-11-17Implement std::pmr::synchronized_pool_resourceJonathan Wakely1-7/+12
Define the thread-safe pool resource, using a shared_mutex to allow multiple threads to concurrently allocate from thread-specific pools. Define new weak symbols for the pthread_rwlock_t functions, to avoid making libstdc++.so depend on libpthread.so When the necessary Gthread support is absent only define the feature-test macro to 1, rather than 201603. This is intended to imply incomplete support, because everything except synchronized_pool_resource works. Implement std::pmr::synchronized_pool_resource * config/abi/pre/gnu.ver: Add new symbols. * include/std/memory_resource [_GLIBCXX_HAS_GTHREADS] (__cpp_lib_memory_resource): Define to expected value, 201603. (synchronized_pool_resource): New class. [!_GLIBCXX_HAS_GTHREADS] (__cpp_lib_memory_resource): Define to 1. * include/std/shared_mutex (__glibcxx_rwlock_rdlock) (__glibcxx_rwlock_tryrdlock, __glibcxx_rwlock_wrlock) (__glibcxx_rwlock_trywrlock, __glibcxx_rwlock_unlock) (__glibcxx_rwlock_destroy, __glibcxx_rwlock_init) (__glibcxx_rwlock_timedrdlock, __glibcxx_rwlock_timedwrlock): Define weak symbols for POSIX rwlock functions. (__shared_mutex_pthread): Use weak symbols. * include/std/version (__cpp_lib_memory_resource): Define. * src/c++17/memory_resource.cc [_GLIBCXX_HAS_GTHREADS] (synchronized_pool_resource::_TPools): New class. (destroy_TPools): New function for pthread_key_create destructor. (synchronized_pool_resource::synchronized_pool_resource) (synchronized_pool_resource::~synchronized_pool_resource) (synchronized_pool_resource::release) (synchronized_pool_resource::do_allocate) (synchronized_pool_resource::do_deallocate): Define public members. (synchronized_pool_resource::_M_thread_specific_pools) (synchronized_pool_resource::_M_alloc_tpools) (synchronized_pool_resource::_M_alloc_shared_tpools): Define private members. * testsuite/20_util/synchronized_pool_resource/allocate.cc: New test. * testsuite/20_util/synchronized_pool_resource/cons.cc: New test. * testsuite/20_util/synchronized_pool_resource/is_equal.cc: New test. * testsuite/20_util/synchronized_pool_resource/multithreaded.cc: New test. * testsuite/20_util/synchronized_pool_resource/release.cc: New test. * testsuite/performance/20_util/memory_resource/pools.cc: Add multithreaded tests using pmr::synchronized_pool_resource. From-SVN: r266242
2018-11-07Fix linker script to use [jmy] to match size_t parametersJonathan Wakely1-2/+2
* config/abi/pre/gnu.ver: Fix patterns for size_t parameters. From-SVN: r265884
2018-11-06Implement std::pmr::unsynchronized_pool_resourceJonathan Wakely1-0/+9
Implement std::pmr::unsynchronized_pool_resource * config/abi/pre/gnu.ver: Add new symbols. * include/std/memory_resource (std::pmr::__pool_resource): New class. (std::pmr::unsynchronized_pool_resource): New class. * src/c++17/Makefile.am: Add -fimplicit-templates to flags for memory_resource.cc * src/c++17/Makefile.in: Regenerate. * src/c++17/memory_resource.cc (bitset, chunk, big_block): New internal classes. (__pool_resource::_Pool): Define new class. (munge_options, pool_index, select_num_pools): New internal functions. (__pool_resource::__pool_resource, __pool_resource::~__pool_resource) (__pool_resource::allocate, __pool_resource::deallocate) (__pool_resource::_M_alloc_pools): Define member functions. (unsynchronized_pool_resource::unsynchronized_pool_resource) (unsynchronized_pool_resource::~unsynchronized_pool_resource) (unsynchronized_pool_resource::release) (unsynchronized_pool_resource::_M_find_pool) (unsynchronized_pool_resource::do_allocate) (unsynchronized_pool_resource::do_deallocate): Define member functions. * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: New test. * testsuite/20_util/unsynchronized_pool_resource/is_equal.cc: New test. * testsuite/20_util/unsynchronized_pool_resource/options.cc: New test. * testsuite/20_util/unsynchronized_pool_resource/release.cc: New test. From-SVN: r265853
2018-10-20testsuite_containers.h ↵François Dumont1-0/+1
(forward_members_unordered<>::forward_members_unordered (const value_type&)): Add local_iterator pre and post increment checks. 2018-10-20 François Dumont <fdumont@gcc.gnu.org> * testsuite/util/testsuite_containers.h (forward_members_unordered<>::forward_members_unordered (const value_type&)): Add local_iterator pre and post increment checks. * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 new symbol. From-SVN: r265344
2018-10-16PR libstdc++/87618 fix typos in linker scriptJonathan Wakely1-2/+2
PR libstdc++/87618 * config/abi/pre/gnu.ver: Fix typos in patterns for basic_stringbuf. * testsuite/27_io/basic_stringbuf/cons/char/default.cc: Disable optimisation to check constructor definition can be linked to. * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: Likewise. From-SVN: r265188
2018-08-30Fix undefined references seen with mingw-w64Jonathan Wakely1-0/+5
* config/abi/pre/gnu.ver: Add missing exports for mingw. From-SVN: r263977
2018-08-14PR libstdc++/85343 overload __throw_ios_failure to take errnoJonathan Wakely1-0/+3
[ios::failure] p2: "When throwing ios_base::failure exceptions, implementations should provide values of ec that identify the specific reason for the failure." This adds a new overload of __throw_ios_failure that can be passed errno, to store error_code(errno, system_category()) in the exception object. PR libstdc++/85343 * acinclude.m4 (libtool_VERSION): Bump version. * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add new symbol version. Export new symbol. * configure: Regenerate. * doc/xml/manual/abi.xml: Document new versions. * include/bits/fstream.tcc (basic_filebuf<C, T>::underflow) (basic_filebuf<C, T>::xsgetn): Pass errno to __throw_ios_failure. * include/bits/functexcept.h (__throw_ios_failure(const char*, int)): Declare new overload. * src/c++11/cxx11-ios_failure.cc (__ios_failure): Add new constructor and static member function. (__throw_ios_failure(const char*, int)): Define. * src/c++98/ios_failure.cc [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure(const char*, int)): Define. * testsuite/util/testsuite_abi.cc: Update known and latest versions. From-SVN: r263535
2018-08-07Define monotonic_buffer_resource members out-of-lineJonathan Wakely1-0/+2
Move the allocation logic into libstdc++.so so that it can be changed without worrying about inlined code in existing binaries. Leave do_allocate inline so that calls to it can be devirtualized, and only the slow path needs to call into the library. * config/abi/pre/gnu.ver: Export monotonic_buffer_resource members. * include/std/memory_resource (monotonic_buffer_resource::release): Call _M_release_buffers to free buffers. (monotonic_buffer_resource::do_allocate): Call _M_new_buffer to allocate a new buffer from upstream. (monotonic_buffer_resource::_M_new_buffer): Declare. (monotonic_buffer_resource::_M_release_buffers): Declare. (monotonic_buffer_resource::_Chunk): Replace definition with declaration as opaque type. * src/c++17/memory_resource.cc (monotonic_buffer_resource::_Chunk): Define. (monotonic_buffer_resource::_M_new_buffer): Define. (monotonic_buffer_resource::_M_release_buffers): Define. From-SVN: r263354
2018-07-24Add initial version of C++17 <memory_resource> headerJonathan Wakely1-0/+5
This is missing the synchronized_pool_resource and unsynchronized_pool_resource classes but is otherwise complete. This is a new implementation, not based on the existing code in <experimental/memory_resource>, but memory_resource and polymorphic_allocator ended up looking almost the same anyway. The constant_init kluge in src/c++17/memory_resource.cc is apparently due to Richard Smith and ensures that the objects are constructed during constant initialiation phase and not destroyed (because the constant_init destructor doesn't destroy the union member and the storage is not reused). * config/abi/pre/gnu.ver: Export new symbols. * configure: Regenerate. * include/Makefile.am: Add new <memory_resource> header. * include/Makefile.in: Regenerate. * include/precompiled/stdc++.h: Include <memory_resource> for C++17. * include/std/memory_resource: New header. (memory_resource, polymorphic_allocator, new_delete_resource) (null_memory_resource, set_default_resource, get_default_resource) (pool_options, monotonic_buffer_resource): Define. * src/Makefile.am: Add c++17 directory. * src/Makefile.in: Regenerate. * src/c++11/Makefile.am: Fix comment. * src/c++17/Makefile.am: Add makefile for new sub-directory. * src/c++17/Makefile.in: Generate. * src/c++17/memory_resource.cc: New. (newdel_res_t, null_res_t, constant_init, newdel_res, null_res) (default_res, new_delete_resource, null_memory_resource) (set_default_resource, get_default_resource): Define. * testsuite/20_util/memory_resource/1.cc: New test. * testsuite/20_util/memory_resource/2.cc: New test. * testsuite/20_util/monotonic_buffer_resource/1.cc: New test. * testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test. * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test. * testsuite/20_util/monotonic_buffer_resource/release.cc: New test. * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc: New test. * testsuite/20_util/polymorphic_allocator/1.cc: New test. * testsuite/20_util/polymorphic_allocator/resource.cc: New test. * testsuite/20_util/polymorphic_allocator/select.cc: New test. * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource): Define concrete memory resource for testing. (__gnu_test::default_resource_mgr): Define RAII helper for changing default resource. From-SVN: r262953
2018-07-06Simplify linker script patterns for std::exception_ptrJonathan Wakely1-8/+4
* config/abi/pre/gnu.ver: Use wildcards to combine related patterns. From-SVN: r262475
2018-07-06P0935R0 Eradicating unnecessarily explicit default constructorsJonathan Wakely1-4/+22
This is the last remaining piece of P0935R0. This adds a default constructor to each of the streambuf and stream types in <sstream> so that default construction does not use the 'explicit' constructor that has a single, defaulted argument. P0935R0 Eradicating unnecessarily explicit default constructors * config/abi/pre/gnu.ver: Tighten existing patterns and export new default constructor symbols. * include/std/sstream (basic_stringbuf, basic_istringstream) (basic_ostringstream, basic_stringstream): Remove default arguments from explicit constructors taking ios_base::openmode and add separate non-explicit default constructors. * testsuite/27_io/basic_istringstream/cons/default.cc: New. * testsuite/27_io/basic_ostringstream/cons/default.cc: New. * testsuite/27_io/basic_stringstream/cons/default.cc: New. * testsuite/27_io/basic_stringbuf/cons/char/default.cc: New. * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: New. From-SVN: r262474
2018-07-05PR libstdc++/85831 define move constructors and operators for exceptionsJonathan Wakely1-0/+7
PR libstdc++/85831 * config/abi/pre/gnu.ver: Export move constructors and move assignment operators for std::logic_error and std::runtime_error. * include/std/stdexcept: Use _GLIBCXX_NOTHROW instead of _GLIBCXX_USE_NOEXCEPT. (logic_error, runtime_error): Declare move constructors and move assignment operators. When not declared already, define copy constructors and copy assignment operators as explicit-defaulted. (domain_error, invalid_argument, length_error, out_of_range) (overflow_error, underflow_error): Define move constructors and move assignment operators as explicitly-defaulted. * libsupc++/exception.h (exception): Likewise. * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Define move constructors and move assignment operators as defaulted. * testsuite/19_diagnostics/stdexcept.cc: Check that constructors and assignment operators are defined. From-SVN: r262456
2018-06-22Fix unexported basic_string symbols for 32-bit targetsJonathan Wakely1-6/+6
* config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for different size_t mangling on 32-bit targets. From-SVN: r261892
2018-06-21PR libstdc++/83328 add correct basic_string::insert for initializer_listJonathan Wakely1-1/+35
The SSO basic_string has a non-standard insert(iterator, initializer_list) overload, from a C++0x draft. This adds the correct overload, while also preserving the old one so that the old symbol is still exported from the library. The COW basic_string doesn't have any of the C++11 changes to the insert overloads (they all still have non-const iterator parameters and the ones that should return an iterator still return void). This doesn't make any change to the COW string. PR libstdc++/83328 * acinclude.m4 (libtool_VERSION): Bump to 6:26:0. * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol. * configure: Regenerate. * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string::insert(const_iterator, initializer_list<C>)): Add. [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS] (basic_string::insert(iterator, initializer_list<C>)): Suppress definition. * include/debug/string (basic_string::insert(iterator, C)): Change first parameter to const_iterator. (basic_string::insert(iterator, size_type, C)): Likewise. Change return type to iterator. (basic_string::insert(iterator, InputIterator, InputIterator)): Likewise. (basic_string::insert(iterator, initializer_list<C>)): Change first parameter to const_iterator and return type to iterator. * src/c++11/string-inst.cc: Extend comment. * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc: New. * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc: New. * testsuite/util/testsuite_abi.cc: Add new symbol version. From-SVN: r261866
2018-01-16PR libstdc++/83834 replace wildcard pattern in linker scriptJonathan Wakely1-1/+1
PR libstdc++/83834 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard pattern with exact match for std::cerr. From-SVN: r256739
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-06-16PR libstdc++/81092 add std::wstring symbols and bump library versionJonathan Wakely1-1/+9
PR libstdc++/81092 * acinclude.m4: Bump libtool_VERSION. * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update. * config/abi/pre/gnu.ver: Add wstring constructor symbols to GLIBCXX_3.4.24 version and move random_device::_M_get_entropy() symbol to new GLIBCXX_3.4.25 version. * doc/xml/manual/abi.xml: Document new versions. * doc/html/*: Regenerate. * testsuite/21_strings/basic_string/cons/char/8.cc: Use base object constructors to ensure required symbols are exported. * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise. * testsuite/util/testsuite_abi.cc: Add new version. From-SVN: r249246
2017-05-23PR libstdc++/67578 Implement non-trivial std::random_device::entropyXi Ruoyao1-0/+7
2017-05-23 Xi Ruoyao <ryxi@stu.xidian.edu.cn> Jonathan Wakely <jwakely@redhat.com> PR libstdc++/67578 * acinclude.m4: Bump libtool_VERSION. * config/abi/pre/gnu.ver: Create GLIBCXX_3.4.24 with new symbol. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Add test for <linux/random.h>. * doc/xml/manual/abi.xml: Document new library version. * include/bits/random.h (random_device::entropy) [_GLIBCXX_USE_RANDOM_TR1]: Add call to new _M_getentropy member. (random_device::_M_getentropy): Declare. * src/c++11/random.cc (random_device::_M_getentropy): Define. * testsuite/util/testsuite_abi.cc: Add GLIBCXX_3.4.24 to known versions, and make it the latest version. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r248374
2017-02-01PR libstdc++/79254 simplify exception-safety in copy assignmentJonathan Wakely1-3/+0
PR libstdc++/79254 * config/abi/pre/gnu.ver: Remove recently added symbols. * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string::_M_copy_assign): Remove. (basic_string::operator=(const basic_string&)): Don't dispatch to _M_copy_assign. If source object is small just deallocate, otherwise perform new allocation before making any changes. * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI] (basic_string::_M_copy_assign(const basic_string&, true_type)): Remove. * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc: Test cases where the allocators are equal or the string is small. * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc: Likewise. From-SVN: r245085
2017-01-27PR libstdc++/79254 fix exception-safety in std::string::operator=Jonathan Wakely1-1/+6
PR libstdc++/79254 * config/abi/pre/gnu.ver: Add new symbols. * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string::_M_copy_assign): New overloaded functions to perform copy assignment. (basic_string::operator=(const basic_string&)): Dispatch to _M_copy_assign. * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI] (basic_string::_M_copy_assign(const basic_string&, true_type)): Define, performing rollback on exception. * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc: Test exception-safety guarantee. * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc: Likewise. * testsuite/util/testsuite_allocator.h (uneq_allocator::swap): Make std::swap visible. From-SVN: r244986
2017-01-04Support exception propagation without lock-free atomic intPauli Nieminen1-0/+47
2017-01-04 Pauli Nieminen <suokkos@gmail.com> Jonathan Wakely <jwakely@redhat.com> PR libstdc++/64735 * acinclude.m4 (GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER): Define. * config.h.in: Regenerate. * config/abi/pre/gnu.ver [HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make exports for exception_ptr, nested_exception, and future conditional. [HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add exports for exception_ptr, nested_exception, and future conditional. * configure: Regenerate. * configure.ac: Use GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER. * include/std/future: Remove check for ATOMIC_INT_LOCK_FREE * libsupc++/eh_atomics.h: New file for internal use only. (__eh_atomic_inc, __eh_atomic_dec): New. * libsupc++/eh_ptr.cc (exception_ptr::_M_addref) (exception_ptr::_M_release) (__gxx_dependent_exception_cleanup) (rethrow_exception): Use eh_atomics.h reference counting helpers. * libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise. * libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise. * libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE. * libsupc++/exception_ptr.h: Likewise. * libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro. * libsupc++/nested_exception.cc: Remove check for ATOMIC_INT_LOCK_FREE. * libsupc++/nested_exception.h: Likewise. * src/c++11/future.cc: Likewise. * testsuite/18_support/exception_ptr/*: Remove atomic builtins checks. * testsuite/18_support/nested_exception/*: Likewise. * testsuite/30_threads/async/*: Likewise. * testsuite/30_threads/future/*: Likewise. * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise. * testsuite/30_threads/packaged_task/*: Likewise. * testsuite/30_threads/promise/*: Likewise. * testsuite/30_threads/shared_future/*: Likewise. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r244051
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-09-12* config/abi/pre/gnu.ver: Use [jmy] for size_t.Jason Merrill1-6/+6
From-SVN: r240097
2016-09-09Implement P0035R4, C++17 new of over-aligned types.Jason Merrill1-0/+12
gcc/cp/ * cp-tree.h (enum cp_tree_index): Add CPTI_ALIGN_TYPE. (align_type_node): New macro. * call.c (build_operator_new_call): Handle C++17 aligned new. (second_parm_is_size_t, build_op_delete_call): Likewise. (non_placement_deallocation_fn_p): Likewise. Rename to usual_deallocation_fn_p. (aligned_allocation_fn_p, aligned_deallocation_fn_p): New. * decl.c (cxx_init_decl_processing): Add aligned new support. * init.c (type_has_new_extended_alignment): New. (build_new_1): Handle aligned new. * tree.c (vec_copy_and_insert): New. gcc/c-family/ * c.opt: Add -faligned-new and -Waligned-new. * c-common.c (max_align_t_align): Split out from... (cxx_fundamental_alignment_p): ...here. * c-common.h: Declare it. * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new. libstdc++-v3/ * libsupc++/new: Declare aligned new/delete operators. * config/abi/pre/gnu.ver: Export them. * configure.ac: Check for aligned_alloc, posix_memalign, memalign, _aligned_malloc. * libsupc++/new_opa.cc: New. * libsupc++/new_opant.cc: New. * libsupc++/new_opva.cc: New. * libsupc++/new_opva.cc: New. * libsupc++/del_opa.cc: New. * libsupc++/del_opant.cc: New. * libsupc++/del_opsa.cc: New. * libsupc++/del_opva.cc: New. * libsupc++/del_opvant.cc: New. * libsupc++/del_opvsa.cc: New. * libsupc++/Makefile.am: Build them. From-SVN: r240056
2016-08-26Add new std::basic_string constructor (LWG 2583)Jonathan Wakely1-3/+31
* config/abi/pre/gnu.ver (GLIBCXX_3.4, GLIBCXX_3.4.21): Use more precise patterns for basic_string constructors. (GLIBCXX_3.4.23): Export new constructors. * doc/xml/manual/intro.xml: Document LWG 2583 status. * doc/html/*: Regenerate. * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string(const basic_string&, size_type, const Alloc&)): Add new constructor for LWG 2583. (basic_string(const basic_string&, size_type, size_type)): Remove default argument. [!_GLIBCXX_USE_CXX11_ABI]: Likewise. * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]: Define it. * testsuite/21_strings/basic_string/cons/char/8.cc: New test. * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: New test. From-SVN: r239773
2016-08-22libstdc++/68297 avoid throw/catch in make_exception_ptrGleb Natapov1-0/+7
2016-08-22 Gleb Natapov <gleb@scylladb.com> PR libstdc++/68297 * config/abi/pre/gnu-versioned-namespace.ver: Export __cxa_init_primary_exception and std::exception_ptr(void*). * config/abi/pre/gnu.ver (CXXABI_1.3.11) : Add new symbol version and export __cxa_init_primary_exception and std::exception_ptr(void*). * include/Makefile.am: Add new headers. * include/Makefile.in: Regenerate. * libsupc++/Makefile.am: Add new headers. * libsupc++/Makefile.in: Regenerate. * libsupc++/cxxabi.h (__cxa_allocate_exception): Move to ... * libsupc++/cxxabi_init_exception.h: New header. (__cxa_init_primary_exception): Declare. * libsupc++/eh_throw.cc (__cxa_init_primary_exception): Define. (__cxa_throw): Use __cxa_init_primary_exception. * libsupc++/exception (std::exception): Move to ... * libsupc++/exception.h: New header. * libsupc++/exception_ptr.h (__exception_ptr::exception_ptr): Add friend declaration. (__exception_ptr::__dest_thunk): New function template. (std::make_exception_ptr) [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Use __cxa_allocate_exception and __cxa_init_primary_exception to create exception_ptr. * libsupc++/typeinfo: Include bits/exception.h instead of exception. * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.11 version. From-SVN: r239664
2016-07-29New libstdc++ symbol version for new basic_string symbolsJonathan Wakely1-1/+13
* acinclude.m4 (libtool_VERSION): Bump to 6:23:0. * config/abi/pre/gnu.ver: Add 3.4.23 version for new basic_string symbols. * configure: Regenerate. * testsuite/util/testsuite_abi.cc: Add new symbol version. From-SVN: r238853
2016-03-24libstdc++/69945 Add __gnu_cxx::__freeres hookJonathan Wakely1-0/+2
PR libstdc++/69945 * config/abi/pre/gnu.ver: Add new symbol. * libsupc++/eh_alloc.cc (__gnu_cxx::__freeres): Define. * testsuite/18_support/free_eh_pool.cc: New test. From-SVN: r234465
2016-01-15libstdc++: Make certain exceptions transaction_safe.Torvald Riegel1-0/+41
From-SVN: r232454
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-09-30messages_members.cc (Catalog_info, Catalogs): Move...François Dumont1-7/+8
2015-09-30 François Dumont <fdumont@gcc.gnu.org> Jonathan Wakely <jwakely@redhat.com> * config/locale/gnu/messages_members.cc (Catalog_info, Catalogs): Move... * config/locale/gnu/c++locale_internal.h: ...here in std namespace. * config/locale/gnu/c_locale.cc: Move implementation of latter here. * src/c++98/Makefile.am: Compile c++locale.cc with -fimplicit-templates. * src/c++98/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Adjust. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r228305
2015-09-29Reduce space and time overhead of std::threadJonathan Wakely1-0/+5
PR libstdc++/65393 * config/abi/pre/gnu.ver: Export new symbols. * include/std/thread (thread::_State, thread::_State_impl): New types. (thread::_M_start_thread): Add overload taking unique_ptr<_State>. (thread::_M_make_routine): Remove. (thread::_S_make_state): Add. (thread::_Impl_base, thread::_Impl, thread::_M_start_thread) [_GLIBCXX_THREAD_ABI_COMPAT] Only declare conditionally. * src/c++11/thread.cc (execute_native_thread_routine): Rename to execute_native_thread_routine_compat and re-define to use _State. (thread::_State::~_State()): Define. (thread::_M_make_thread): Define new overload. (thread::_M_make_thread) [_GLIBCXX_THREAD_ABI_COMPAT]: Only define old overloads conditionally. From-SVN: r228242
2015-06-09re PR libstdc++/66030 ([5.1.0] std::codecvt_byname missing from libstdc++ DLL)Jonathan Wakely1-3/+6
PR libstdc++/66030 * config/abi/pre/gnu.ver: Export codecvt_byname and codecvt symbols for mingw32. From-SVN: r224273
2015-04-27gnu.ver: Fix comment.Ville Voutilainen1-1/+1
2015-04-27 Ville Voutilainen <ville.voutilainen@gmail.com> * config/abi/pre/gnu.ver: Fix comment. From-SVN: r222483
2015-04-27Add support for std::uncaught_exceptions.Ville Voutilainen1-1/+9
2015-04-27 Ville Voutilainen <ville.voutilainen@gmail.com> Add support for std::uncaught_exceptions. * acinclude.m4: Bump libtool_VERSION. * config/abi/pre/gnu.ver: Export the new symbol. * configure: Regenerate. * libsupc++/eh_catch.cc (uncaught_exceptions): New. * libsupc++/exception (uncaught_exceptions): New. * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc: New. * testsuite/util/testsuite_abi.cc: Add 3.4.22 as the latest version. From-SVN: r222482
2015-04-13re PR libstdc++/65754 (missing exports for fstream constructors)Jonathan Wakely1-2/+2
PR libstdc++/65754 * config/abi/pre/gnu.ver: Export base object constructors for fstreams. * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update. * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/solaris2.10/baseline_symbols.txt: Regenerate. * config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Likewise. * config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Likewise. * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update. * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Update. * testsuite/27_io/basic_fstream/cons/base.cc: New. From-SVN: r222059
2015-03-30re PR libstdc++/65630 (operator+ for new std::string not exported)Jonathan Wakely1-0/+3
PR libstdc++/65630 * config/abi/pre/gnu.ver: Export operator+ for new strings. * testsuite/21_strings/basic_string/operators/char/65630.cc: New. * testsuite/21_strings/basic_string/operators/wchar_t/65630.cc: New. From-SVN: r221775
2015-01-23gnu.ver: Tighten GLIBCXX_3.4 patterns to not match new std::string ↵Jonathan Wakely1-9/+53
constructors for... * config/abi/pre/gnu.ver: Tighten GLIBCXX_3.4 patterns to not match new std::string constructors for byname facets. From-SVN: r220043
2015-01-21* config/abi/pre/gnu.ver: Use [jmy] for size_t parameters.Jonathan Wakely1-20/+20
From-SVN: r219953
2015-01-20Add C++11 std::string constructors for locales and facets.Jonathan Wakely1-3/+34
* config/abi/pre/gnu.ver: Export new constructors. * include/bits/codecvt.h (codecvt_byname): Add string constructor. (codecvt_byname<char16_t>, codecvt_byname<char32_t>): Define explicit specializations and declare explicit instantiations. * include/bits/locale_classes.h (locale, collate_byname): Add string constructors. * include/bits/locale_facets.h (ctype_byname, numpunct_byname): Likewise. * include/bits/locale_facets_nonio.h (time_get_byname, time_put_byname, moneypunct_byname, messages_byname): Likewise. * src/c++11/codecvt.cc (codecvt_byname<char16_t>, codecvt_byname<char32_t>): Define explicit instantiations. * src/c++11/locale-inst.cc (time_put_byname, codecvt_byname): Instantiate string constructors. (ctype_byname): Define string constructor. * testsuite/22_locale/codecvt_byname/1.cc: New. * testsuite/22_locale/collate_byname/1.cc: New. * testsuite/22_locale/ctype_byname/2.cc: New. * testsuite/22_locale/messages_byname/1.cc: New. * testsuite/22_locale/moneypunct_byname/1.cc: New. * testsuite/22_locale/numpunct_byname/1.cc: New. From-SVN: r219887
2015-01-16Implement C++11 <codecvt> header.Jonathan Wakely1-0/+11
* config/abi/pre/gnu.ver: Export new symbols. * include/Makefile.am: Add codecvt. * include/Makefile.in: Regenerate. * include/std/codecvt: New header. * src/c++11/codecvt.cc (__codecvt_utf8_base, __codecvt_utf16_base, __codecvt_utf8_utf16_base): Define specializations. * testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc: New. * testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc: New. * testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc: New. From-SVN: r219779
2015-01-16libstdc++: Optimize synchronization in std::future if futexes are available.Torvald Riegel1-0/+5
* src/c++11/futex.cc: New file. * include/bits/atomic_futex.h: New file. * include/std/future (__future_base::_State_baseV2): Use atomic_futex_unsigned instead of mutex+condvar. * src/c++11/futex.cc: Likewise. * include/Makefile.am: Add atomic_futex.h. * include/Makefile.in: Likewise. * src/c++11/Makefile.am: Add futex.cc. * src/c++11/Makefile.in: Likewise. From-SVN: r219770
2015-01-16acinclude.m4: Fix typo in comment.Jonathan Wakely1-0/+5
* acinclude.m4: Fix typo in comment. * configure: Regenerate. * include/bits/codecvt.h (codecvt<char16_t, char, mbstate_t>, codecvt<char16_t, char, mbstate_t>): Declare specializations. * include/bits/locale_facets.h: Reserve space for new specializations. * src/c++11/Makefile.am: Add codecvt.cc. * src/c++11/Makefile.in: Regenerate. * src/c++11/codecvt.cc: New. * src/c++98/Makefile.am: Compile locale_init.cc and localename.cc with -std=gnu++11. * src/c++98/Makefile.in: Regenerate. * src/c++98/locale_init.cc: Initialize new codecvt specializations. * src/c++98/localename.cc: Likewise. * config/abi/pre/gnu.ver: Exports for new codecvt specializations. * testsuite/22_locale/codecvt/utf8.cc: New. * testsuite/22_locale/locale/cons/unicode.cc: Check that new specializations are installed in locale objects. From-SVN: r219747
2015-01-13re PR libstdc++/64571 (Link failure with fstream due to new string ↵Jonathan Wakely1-0/+7
implementation) PR libstdc++/64571 * config/abi/pre/gnu.ver: Export fstream functions using new string. From-SVN: r219537
2015-01-06* config/abi/pre/gnu.ver: Fix version conflict for std::locale::name().Jonathan Wakely1-1/+1
From-SVN: r219260
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188