aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/libsupc++
AgeCommit message (Collapse)Author
2016-01-15libstdc++: Make certain exceptions transaction_safe.Torvald Riegel
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@232454 138bc75d-0d04-0410-961f-82ee72b054a4
2016-01-04 Update copyright years.Jakub Jelinek
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@232055 138bc75d-0d04-0410-961f-82ee72b054a4
2015-12-11PR libstdc++/68139Ville Voutilainen
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@231562 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-11 * libsupc++/new_handler.cc: Fix for explicit constructor change.Jonathan Wakely
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@230184 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-112015-11-10 Ville Voutilainen <ville.voutilainen@gmail.com>Ville Voutilainen
LWG 2510, make the default constructors of library tag types explicit. * include/bits/mutex.h (defer_lock_t, try_lock_t, adopt_lock_t): Add an explicit default constructor. * include/bits/stl_pair.h (piecewise_construct_t): Likewise. * include/bits/uses_allocator.h (allocator_arg_t): Likewise. * libsupc++/new (nothrow_t): Likewise. * testsuite/17_intro/tag_type_explicit_ctor.cc: New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@230175 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-11 PR libstdc++/64651Jonathan Wakely
* libsupc++/exception_ptr.h (rethrow_exception): Add using-declaration to __exception_ptr namespace. * testsuite/18_support/exception_ptr/rethrow_exception.cc: Test ADL. Remove unnecessary test variables. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@230147 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-03 * libsupc++/new: Declare sized deletes.Jason Merrill
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@229713 138bc75d-0d04-0410-961f-82ee72b054a4
2015-10-04 Implement N4514, C++ Extensions for Transactional Memory.Jason Merrill
gcc/ * builtins.def (BUILT_IN_ABORT): Add transaction_pure attribute. gcc/c-family/ * c-common.c (c_common_reswords): Add C++ TM TS keywords. (c_common_attribute_table): Add transaction_safe_dynamic. transaction_safe now affects type identity. (handle_tm_attribute): Handle transaction_safe_dynamic. * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT, RID_ATOMIC_CANCEL, RID_SYNCHRONIZED. (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED. (D_TRANSMEM): New. * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory. * c-pretty-print.c (pp_c_attributes_display): Don't print transaction_safe in C++. gcc/c/ * c-parser.c (c_lex_one_token): Handle @synchronized. * c-decl.c (match_builtin_function_types): A declaration of a built-in can change whether the function is transaction_safe. gcc/cp/ * cp-tree.h (struct cp_declarator): Add tx_qualifier field. (BCS_NORMAL, BCS_TRANSACTION): New enumerators. * lex.c (init_reswords): Limit TM kewords to -fgnu-tm. * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized. (make_call_declarator): Take tx_qualifier. (cp_parser_tx_qualifier_opt): New. (cp_parser_lambda_declarator_opt): Use it. (cp_parser_direct_declarator): Likewise. (cp_parser_statement): Handle atomic_noexcept, atomic_cancel. (cp_parser_compound_statement): Change in_try parameter to bcs_flags. (cp_parser_std_attribute): Map optimize_for_synchronized to transaction_callable. (cp_parser_transaction): Take the token. Handle atomic_noexcept. * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety. * call.c (enum conversion_kind): Add ck_tsafe. (standard_conversion): Handle transaction-safety conversion. (convert_like_real, resolve_address_of_overloaded_function): Likewise. (check_methods): Diagnose transaction_safe_dynamic on non-virtual function. (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic. * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant) (can_convert_tx_safety): New. * typeck.c (composite_pointer_type): Handle transaction-safety. * name-lookup.h (enum scope_kind): Add sk_transaction. * name-lookup.c (begin_scope): Handle it. * semantics.c (begin_compound_stmt): Pass it. * decl.c (check_previous_goto_1): Check it. (struct named_label_entry): Add in_transaction_scope. (poplevel_named_label_1): Set it. (check_goto): Check it. (duplicate_decls): A specialization can be transaction_safe independently of its template. (grokdeclarator): Handle tx-qualifier. * rtti.c (ptr_initializer): Handle transaction-safe. * search.c (check_final_overrider): Check transaction_safe_dynamic. Don't check transaction_safe. * mangle.c (write_function_type): Mangle transaction_safe here. (write_CV_qualifiers_for_type): Not here. (write_type): Preserve transaction_safe when stripping attributes. * error.c (dump_type_suffix): Print transaction_safe. libiberty/ * cp-demangle.c (d_cv_qualifiers): Dx means transaction_safe. (cplus_demangle_type): Let d_cv_qualifiers handle it. (d_dump, d_make_comp, has_return_type, d_encoding) (d_count_templates_scopes, d_print_comp_inner) (d_print_mod_list, d_print_mod, d_print_function_type) (is_ctor_or_dtor): Handle DEMANGLE_COMPONENT_TRANSACTION_SAFE. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@228462 138bc75d-0d04-0410-961f-82ee72b054a4
2015-07-24libstdc++-v3/fragment.am (AM_CPPFLAGS): Add CPPFLAGSMichael Haubenwallner
2015-07-24 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> * fragment.am (AM_CPPFLAGS): Add CPPFLAGS. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * src/c++11/Makefile.in: Regenerate. * src/c++98/Makefile.in: Regenerate. * src/filesystem/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@226138 138bc75d-0d04-0410-961f-82ee72b054a4
2015-07-02 * libsupc++/guard.cc (__test_and_acquire): Use __p after __atomic_loadUros Bizjak
to avoid unused variable warning. (__set_and_release): Use __p after __atomic_store to avoid unused variable warning. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@225298 138bc75d-0d04-0410-961f-82ee72b054a4
2015-06-12Use atomics in guard.cc.Ramana Radhakrishnan
This provides proper definitions for _GLIBCXX_READ_MEM_BARRIER and _GLIBCXX_WRITE_MEM_BARRIER, rewrites the guards in terms of proper atomic extensions and removes internal uses of _GLIBCXX_READ_MEM_BARRIER and _GLIBCXX_WRITE_MEM_BARRIER and replaces them with equivalent atomics. 2015-06-12 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> PR target/66200 PR c++/66192 * * config/cpu/generic/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER): Define (_GLIBCXX_WRITE_MEM_BARRIER): Likewise * include/bits/shared_ptr_base.h: Use ACQ_REL barrier. * include/ext/atomicity.h: Likewise. * include/tr1/shared_ptr.h: Likewise. * libsupc++/guard.cc (__test_and_acquire): Rewrite with atomics. Update comment. (__set_and_release): Likewise. * testsuite/20_util/shared_ptr/cons/43820_neg.cc (test01): Adjust for line numbers. * testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@224411 138bc75d-0d04-0410-961f-82ee72b054a4
2015-05-21 * libsupc++/del_opv.cc: Suppress -Wsized-deallocation.Jason Merrill
* libsupc++/del_op.cc: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@223488 138bc75d-0d04-0410-961f-82ee72b054a4
2015-05-13config/Eric Botcazou
* sjlj.m4: New file. libgcc/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * config.in: Regenerate. * configure: Likewise. * config.host: Replace enable_sjlj_exceptions by ac_cv_sjlj_exceptions. libjava/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * include/config.h.in: Regenerate. * configure: Likewise. * exception.cc: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * stacktrace.cc: Likewise. * include/default-signal.h: Likewise. * sysdep/i386/backtrace.h: Likewise. libobjc/ * configure.ac: Remove manual SJLJ check. * config.h.in: Regenerate. * configure: Likewise. * exception.c: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. libstdc++-v3/ * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Delete. * configure.ac: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS. * config.h.in: Regenerate. * configure: Likewise. * libsupc++/eh_personality.cc: Replace _GLIBCXX_SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * libsupc++/eh_throw.cc: Likewise. * libsupc++/eh_ptr.cc: Likewise. * doc/html/manual/appendix_porting.html: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS * doc/xml/manual/build_hacking.xml: Likewise. * doc/html/manual/configure.html: Remove --enable-sjlj-exceptions. * doc/xml/manual/configure.xml: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@223181 138bc75d-0d04-0410-961f-82ee72b054a4
2015-05-13libstdc++: Bump to automake 1.11.6Michael Haubenwallner
2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> * Makefile.in: Regenerated with automake-1.11.6. * aclocal.m4: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. * include/Makefile.in: Likewise. * libsupc++/Makefile.in: Likewise. * po/Makefile.in: Likewise. * python/Makefile.in: Likewise. * src/Makefile.in: Likewise. * src/c++11/Makefile.in: Likewise. * src/c++98/Makefile.in: Likewise. * src/filesystem/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@223125 138bc75d-0d04-0410-961f-82ee72b054a4
2015-04-28 * libsupc++/exception (uncaught_exceptions): Add comment. Reorder #if.Jonathan Wakely
* testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc: Use -std=gnu++1z. Check feature-test macro. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@222523 138bc75d-0d04-0410-961f-82ee72b054a4
2015-04-272015-04-27 Federico Lenarduzzi <federico.lenarduzzi@tallertechnologies.com>Federico Lenarduzzi
Jonathan Wakely <jwakely@redhat.com> * libsupc++/eh_catch.cc (uncaught_exception, uncaught_exceptions): Return false or zero if the library is built without exceptions. * libsupc++/eh_term_handler.cc: Disable verbose terminate handler if the library is built without exceptions. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@222484 138bc75d-0d04-0410-961f-82ee72b054a4
2015-04-272015-04-27 Ville Voutilainen <ville.voutilainen@gmail.com>Ville Voutilainen
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@222482 138bc75d-0d04-0410-961f-82ee72b054a4
2015-04-272015-04-27 Dmitry Prokoptsev <dprokoptsev@gmail.com>Dmitry Prokoptsev
Michael Hanselmann <public@hansmi.ch> PR libstdc++/62258 * libsupc++/eh_ptr.cc (rethrow_exception): Increment count of uncaught exceptions. * testsuite/18_support/exception_ptr/62258.cc: New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@222480 138bc75d-0d04-0410-961f-82ee72b054a4
2015-03-17 * libsupc++/nested_exception.h: Do not try to derive from finalJonathan Wakely
classes. * testsuite/18_support/nested_exception/throw_with_nested.cc: Test final class. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@221476 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-29Committing generated configure & Makefile.in pieces ofCaroline Tice
VTV Cygwin patch (from Patrick Wollgast). Forgot to commit these with the rest of the patch. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@220254 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-29Committing VTV Cygwin patch for Patrick WollgastCaroline Tice
* gcc/config/i386/cygwin.h (STARTFILE_SPEC): Add vtv_start.o, if -fvtable-verify=preinit/std is used. * gcc/config/i386/mingw-w64.h (STARTFILE_SPEC): Likewise. * gcc/config/i386/mingw32.h (STARTFILE_SPEC): Likewise. * gcc/config/i386/cygwin.h (ENDFILE_SPEC): Add vtv_end.o, if -fvtable-verify=preinit/std is used. * gcc/config/i386/mingw32.h (ENDFILE_SPEC): Likewise. * gcc/config/i386/cygwin.h (LIB_SPEC): Pass -lvtv and -lpsapi, if -fvtable-verify=preinit/std is used. * gcc/config/i386/mingw-w64.h (LIB_SPEC): Likewise. * gcc/config/i386/mingw32.h (LIB_SPEC): Likewise. * gcc/cp/vtable-class-hierarchy.c (vtv_generate_init_routine): Add check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks. * gcc/varasm.c (assemble_variable): Add code to properly set the comdat section and name for the .vtable_map_vars section in case the target is PE or COFF. * libgcc/Makefile.in: Move rules to build vtv_*.o out of the check for CUSTOM_CRTSTUFF. * libgcc/config.host (i[34567]86-*-cygwin*, x86_64-*-cygwin*, i[34567]86-*-mingw*) (x86_64-*-mingw*): Only add vtv_*.o to extra_parts if enable_vtable_verify. * libstdc++-v3/acinclude.m4: Define VTV_CYGMIN. * libstdc++-v3/configure: Regenerate. * libstdc++-v3/libsupc++/Makefile.am: Add vtv_sources only to libsupc___la_SOURCES and libsupc__convenience_la_SOURCES if VTV_CYGMIN is not set. * libstdc++-v3/libsupc++/Makefile.in: Regenerated. * libstdc++-v3/libsupc++/vtv_stubs.cc: Add none weak declaration of every function for Cygwin and MinGW. * libstdc++-v3/src/Makefile.am: Add libvtv.la to toolexeclib_LTLIBRARIES, if VTV_CYGMIN is set. Define libvtv_la_SOURCES, libvtv_la_LDFLAGS, libvtv_la_AM_CXXFLAGS and libvtv_la_LINK if VTV_CYGMIN is set. * libstdc++-v3/src/Makefile.in: Regenerate. * libvtv/Makefile.am : Add libvtv.la to toolexeclib_LTLIBRARIES, if VTV_CYGMIN is set. Define libvtv_la_LIBADD, libvtv_la_LDFLAGS, libvtv_stubs_la_LDFLAGS and libvtv_stubs_la_SOURCES if VTV_CYGMIN is set. Add obstac.c to libvtv_la_SOURCES if VTV_CYGMIN is set. * libvtv/Makefile.in : Regenerate. * libvtv/aclocal.m4 : Regenerate. * libvtv/configure : Regenerate. * libvtv/configure.ac : Add ACX_LT_HOST_FLAGS. Define VTV_CYGMIN. * libvtv/configure.tgt : (x86_64-*-cygwin*, i?86-*-cygwin*, x86_64-*-mingw*) (i?86-*-mingw*): Add to supported targets. * libvtv/vtv_fail.cc : Skip inclusion of execinfo.h on Cygwin and MinGW. (log_error_message): Skip calls to backtrace and backtrace_symbols_fd on Cygwin and MinGW. * libvtv/vtv_malloc.cc : Include windows.h and skip sys/mman.h inclusion on Cygwin and MinGW. Add sysconf port on Cygwin and MinGW. (obstack_chunk_alloc): Exchange call to mmap with call to VirtualAlloc on Cygwin and MinGW. (__vtv_malloc_init): Exchange call to sysconf with call to port of sysconf on Cygwin and MinGW. * libvtv/vtv_malloc.h : Declare mprotect and define PROT_READ and PROT_WRITE on Cygwin and MinGW. * libvtv/map.h : Include stdint.h on MinGW. * libvtv/rts.cc : Include windows.h, winternl.h and psapi.h, skip include of execinfo.h, sys/mman.h and link.h on Cygwin and MinGW. Add port of __fortify_fail on Cygwin and MinGW. Change ElfW (Addr) to uintptr_t on Cygwin and MinGW. (read_section_offset_and_length): Add port for Cygwin and MinGW (iterate_modules): New function. (vtv_unprotect_vtable_vars): Use iterate_modules instead of dl_iterate_phdr on Cygwin and MinGW. (vtv_protect_vtable_vars): Likewise. (count_all_pages): Likewise. (dl_iterate_phdr_count_pages): Don't build on Cygwin and MinGW. * libvtv/utils.cc : Include windows.h and skip execinfo.h inclusion on Cygwin and MinGW. (__vtv_open_log): Exchange call to getuid and getpid with GetCurrentProcessId and adjust call to snprintf accordingly on Cygwin and MinGW. Adjust calls to mkdir on MinGW. Adjust call to open on Cygwin and MinGW. (__vtv_add_to_log): Adjust call to snprintf on Cygwin and MinGW. (__vtv_log_verification_failure): Don't generate a backtrace on Cygwin and MinGW. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@220232 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-28 PR libstdc++/64828Jonathan Wakely
* libsupc++/Makefile.am: Compile del_opvs.cc as C++14. * libsupc++/Makefile.in: Regenerate. * src/c++11/Makefile.in: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@220207 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-282015-01-28 Richard Biener <rguenther@suse.de>Richard Biener
PR libstdc++/64798 * libsupc++/eh_alloc.cc (struct allocated_entry): Align data member. (pool::allocate): Adjust allocation size and alignment to that change. (pool::free): Adjust pointer offsetting. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@220201 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-222015-01-22 Richard Biener <rguenther@suse.de>Richard Biener
PR libstdc++/64535 * libsupc++/eh_alloc.cc: Include new. (bitmask_type): Remove. (one_buffer): Likewise. (emergency_buffer): Likewise. (emergency_used): Likewise. (dependents_buffer): Likewise. (dependents_used): Likewise. (class pool): New custom fixed-size arena, variable size object allocator. (emergency_pool): New global. (__cxxabiv1::__cxa_allocate_exception): Use new emergency_pool. (__cxxabiv1::__cxa_free_exception): Likewise. (__cxxabiv1::__cxa_allocate_dependent_exception): Likewise. (__cxxabiv1::__cxa_free_dependent_exception): Likewise. * g++.old-deja/g++.eh/badalloc1.C: Adjust. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@219988 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-09gcc:Andreas Tobler
* ginclude/unwind-arm-common.h: Revert previous commit. libstdc++-v3: * libsupc++/unwind-cxx.h: Revert previous commit. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@219392 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-09toplevel:Andreas Tobler
* configure.ac: Don't add ${libgcj} for arm*-*-freebsd*. * configure: Regenerate. gcc: * config.gcc (arm*-*-freebsd*): New configuration. * config/arm/freebsd.h: New file. * config.host: Add extra components for arm*-*-freebsd*. * config/arm/arm.h: Introduce MAX_SYNC_LIBFUNC_SIZE. * config/arm/arm.c (arm_init_libfuncs): Use MAX_SYNC_LIBFUNC_SIZE. libgcc: * config.host (arm*-*-freebsd*): Add new configuration for arm*-*-freebsd*. * config/arm/freebsd-atomic.c: New file. * config/arm/t-freebsd: Likewise. * config/arm/unwind-arm.h: Add __FreeBSD__ to the list of 'PC-relative indirect' OS's. libatomic: * configure.tgt: Exclude arm*-*-freebsd* from try_ifunc. libstdc++-v3: * configure.host: Add arm*-*-freebsd* port_specific_symbol_files. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@219388 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-07 * libsupc++/Makefile.am: Compile del_ops.cc as C++14.Jonathan Wakely
* libsupc++/Makefile.in: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@219317 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-05 Update copyright years.Jakub Jelinek
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@219188 138bc75d-0d04-0410-961f-82ee72b054a4
2014-12-19New std::string implementation.Jonathan Wakely
* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove. (GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add. * configure.ac: Use new macros. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI. * include/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Export symbols related to new std::string. Tighten old patterns to not match new symbols. * config/locale/generic/monetary_members.cc: Guard some definitions to not compile with new ABI. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/numeric_members.cc: Prevent double-free. * config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128 exports. Tighten old patterns. * doc/xml/manual/configure.xml: Document new configure options. * doc/html/*: Regenerate. * include/bits/basic_string.h (__cxx11::basic_string): Define new non-reference-counted implementation in inline namespace __cxx11. (stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use inline namespace. (literals::string_literals::operator"): Conditionally use abi-tag. * include/bits/basic_string.tcc (__cxx11::basic_string): Define. * include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and LDBL_CXX11_ABI namespace macros. * include/bits/locale_classes.h (locale::name()): Use abi_tag when new ABI is in use. (locale::_S_twinned_facets): New static member. (locale::facet::__shim): Declare new type. (locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New functions for creating shims. (locale::_Impl::_M_facet_unchecked): New member function for use during construction. (locale::_Impl::_M_init_extra): New member functions to create second version of some facets. (collate, collate_byname): Use abi_tag when new ABI is in use. * include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro. (numpunct, numpunct_byname): Use __cxx11 namespace. (num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag when new ABI is in use. (num_get::__do_get, num_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on definitions. (numpunct, numpunct_byname): Qualify explicit instantiations. * include/bits/locale_facets_nonio.h (time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new inline namespace macros. (money_get::__do_get, money_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets_nonio.tcc (money_get, money_put): Use new namespace macros. (money_get::__do_get, money_put::__do_put): Do not define for new ABI. * include/bits/localefwd.h (numpunct, numpunct_byname, collate, collate_byname, time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new namespace macros. * include/bits/regex.h: Use inline namespace macros. * include/bits/stl_list.h (_List_base, list): Use inline namespace instead of abi-tag. * include/bits/stringfwd.h (basic_string): Use namespace macros. * include/std/iosfwd (basic_stringbuf, basic_istringstream, basic_ostringstream, basic_stringstream): Likewise. * include/std/sstream: Likewise. (basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move. * include/std/stdexcept (__cow_string, __sso_string): New types for indirectly using std::string with either ABI. (logic_error, runtime_error): Replace std::string member with __cow_string when new ABI is in use. Declare non-inline copy constructor and assignment operator. Declare const char* constructors. (domain_error, invalid_argument, length_error, out_of_range, range_error, overflow_error, underflow_error): Declare const char* constructors. * include/std/system_error (error_category): Replace with new definition in inline namespace _V2. (error_code::message, error_condition::message): Use abi_tag on functions returning std::string. * python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI. * src/c++11/Makefile.am: Add new files. * src/c++11/Makefile.in: Regenerate. * src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI. Define old error_category symbols. * src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members using old std::string ABI. * src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define. * src/c++11/cow-shim_facets.cc: Define shim facets using old ABI. * src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old std::string ABI. * src/c++11/cow-stdexcept.cc: Define new constructors and assignment operators. (__cow_string, error_category::_M_message): Define. * src/c++11/cow-string-inst.cc: Explicit instantiations using old std::string. Include src/c++98/istream-string.cc. * src/c++11/cow-wstring-inst.cc: Explicit instantiations using old std::wstring. * src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new string. * src/c++11/cxx11-ios_failure.cc: Add sanity check. * src/c++11/cxx11-locale-inst.cc: Instantiate facets using new std::string. * src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI. * src/c++11/cxx11-stdexcept.cc: Define constructors taking new std::string. * src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using new std::wstring. * src/c++11/fstream-inst.cc: Compile with new ABI. * src/c++11/functexcept.cc: Compile with old ABI. * src/c++11/random.cc: Compile with new ABI. * src/c++11/sstream-inst.cc: Compile with new ABI. * src/c++11/string-inst.cc: Explicit instantiations for new string. * src/c++11/system_error.cc (__sso_string, error_category::_M_message): Define. * src/c++11/wstring-inst.cc: Compile with new ABI. * src/c++98/Makefile.am: Compile some host files twice for old and new std::string. Add new files. * src/c++98/Makefile.in: Regenerate. * src/c++98/compatibility-ldbl.cc: Compile with old ABI. * src/c++98/compatibility.cc: Likewise. * src/c++98/concept-inst.cc: Likewise. * src/c++98/hash_tr1.cc: Likewise. * src/c++98/istream-string.cc: New file defining functions that work with istream and std::string moved from ... * src/c++98/istream.cc: ... here. * src/c++98/cow-istream-string.cc: Recompile istream-string.cc with old ABI. * src/c++98/locale-inst.cc: Adjust facet instantiations to work for either ABI. * src/c++98/locale.cc (locale::_M_install_facet, locale::_M_install_cache): Handle twinned facets. * src/c++98/locale-facets.cc: Compile with old std::string ABI. (__verify_grouping): Define new overload and old std::string version. * src/c++98/locale_init.cc: Initialize twinned facets. * src/c++98/localename.cc: Likewise. * src/c++98/misc-inst.cc: Instantiate C++98-only std::string members. (__verify_grouping): Define new std::string version. * src/c++98/stdexcept.cc: Compile with old std::string ABI. * src/c++98/wlocale-inst.cc: Likewise. * testsuite/18_support/50594.cc: Adjust to work with SSO strings. * testsuite/21_strings/basic_string/capacity/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Likewise. * testsuite/21_strings/headers/string/synopsis.cc: Use inline namespace macros. * testsuite/23_containers/headers/list/synopsis.cc: Likewise. * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so correct exception type can be caught. * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/char/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise. * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. * testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error. * testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI. * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. * testsuite/util/exception/safety.h: Adjust member function types for new std::string. * testsuite/util/testsuite_abi.cc: Add new version and ignore __float128 symbols in __cxx11 namespace. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@218964 138bc75d-0d04-0410-961f-82ee72b054a4
2014-12-15 N3778: Sized DeallocationJason Merrill
gcc/c-family/ * c.opt (-fsized-deallocation, -Wc++14-compat): New. (-Wsized-deallocation): New. * c-opts.c (c_common_post_options): -fsized-deallocation defaults to on in C++14 and up. gcc/cp/ * call.c (non_placement_deallocation_fn_p): A global sized operator delete is not a usual deallocation function until C++14. (build_op_delete_call): Choose the global sized op delete if we know the size. * cp-tree.h: Declare non_placement_deallocation_fn_p. (enum cp_tree_index): Remove CPTI_GLOBAL_DELETE_FNDECL. (global_delete_fndecl): Remove. * decl.c (cxx_init_decl_processing): Also declare sized op deletes. (grok_op_properties): Warn about sized dealloc without the flag. * init.c (build_builtin_delete_call): Remove. (build_vec_delete_1, build_delete): Don't call it. * decl2.c (maybe_warn_sized_delete): New. (cp_write_global_declarations): Call it. libstdc++-v3/ * libsupc++/del_ops.cc: New. * libsupc++/del_opvs.cc: New. * libsupc++/Makefile.am: Add them. * libsupc++/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Export _ZdlPvm and _ZdaPvm. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@218755 138bc75d-0d04-0410-961f-82ee72b054a4
2014-12-12 PR libstdc++/64276Jonathan Wakely
* doc/doxygen/user.cfg.in: Define __cpp_exceptions and __cpp_rtti. * doc/html/manual/using_exceptions.html: Regenerate. * doc/xml/manual/using_exceptions.xml: Use SD-6 feature-testing macros, __cpp_exceptions and __cpp_rtti, instead of __EXCEPTIONS and __GXX_RTTI. * include/bits/c++config: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/shared_ptr_base.h: Likewise. * include/debug/formatter.h: Likewise. * include/experimental/any: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/std/functional: Likewise. * include/tr1/functional: Likewise. * include/tr1/shared_ptr.h: Likewise. * libsupc++/eh_call.cc: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/exception_defines.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/guard.cc: Likewise. * libsupc++/pbase_type_info.cc: Likewise. * libsupc++/pointer_type_info.cc: Likewise. * libsupc++/vterminate.cc: Likewise. * src/c++11/thread.cc: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@218679 138bc75d-0d04-0410-961f-82ee72b054a4
2014-12-12 PR libstdc++/64241Jonathan Wakely
* libsupc++/exception_ptr.h: Return empty object when exceptions are disabled. * testsuite/18_support/exception_ptr/64241.cc: New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@218675 138bc75d-0d04-0410-961f-82ee72b054a4
2014-12-12 Remove N3639 "array of runtime length" from -std=c++14.Jason Merrill
gcc/cp/ * decl.c (compute_array_index_type): VLAs are not part of C++14. (create_array_type_for_decl, grokdeclarator): Likewise. * lambda.c (add_capture): Likewise. * pt.c (tsubst): Likewise. * rtti.c (get_tinfo_decl): Likewise. * semantics.c (finish_decltype_type): Likewise. * typeck.c (cxx_sizeof_or_alignof_type): Likewise. (cp_build_addr_expr_1): Likewise. * init.c (build_vec_init): Don't throw bad_array_length. gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if we aren't complaining about VLAs. libstdc++-v3/ * libsupc++/new (bad_array_length): Move... * bad_array_length.cc: ...here. * cxxabi.h, eh_aux_runtime.cc (__cxa_throw_bad_array_new_length): Also move to bad_array_length.cc. * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if we aren't complaining about VLAs. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@218655 138bc75d-0d04-0410-961f-82ee72b054a4
2014-09-18 * libsupc++/dyncast.cc (__dynamic_cast): Handle mid-destructionJason Merrill
dynamic_cast more gracefully. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@215350 138bc75d-0d04-0410-961f-82ee72b054a4
2014-09-102014-09-10 Tony Wang <tony.wang@arm.com>Tony Wang
libstdc++-v3/ PR target/56846 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Return with CONTINUE_UNWINDING when the state pattern contains: _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@215101 138bc75d-0d04-0410-961f-82ee72b054a4
2014-08-192014-08-19 Yaakov Selkowitz <yselkowi@redhat.com>Yaakov Selkowitz
Kai Tietz <ktietz@redhat.com> * config/os/mingw32-w64/os_defines.h (_GLIBCXX_THREAD_ATEXIT_WIN32): Define. * config/os/newlib/os_defines.h (_GLIBCXX_THREAD_ATEXIT_WIN32): Ditto. * libsupc++/atexit_thread.cc [_GLIBCXX_THREAD_ATEXIT_WIN32]: #include <windows.h>. (struct elt): Add dll member. (run): Decrement dll refcount. (__cxxabiv1::__cxa_thread_atexit): Increment dll refcount. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@214163 138bc75d-0d04-0410-961f-82ee72b054a4
2014-08-15 PR libstdc++/62154Jonathan Wakely
* libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested): Rewrite to conform to C++11 requirements. * testsuite/18_support/nested_exception/62154.cc: New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@214025 138bc75d-0d04-0410-961f-82ee72b054a4
2014-08-012014-08-01 Zifei Tong <zifeitong@gmail.com>Zifei Tong
* libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add _GLIBCXX_ prefix to macro. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@213504 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-09 PR libstdc++/61728Jason Merrill
* libsupc++/cxxabi.h: Define __pbase_type_info::__pointer_catch here. * libsupc++/tinfo.h: Not here. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@212413 138bc75d-0d04-0410-961f-82ee72b054a4
2014-06-30 PR c++/61659Jason Merrill
PR lto/53808 gcc/cp * decl2.c (maybe_emit_vtables): Mark all vtable entries if devirtualizing. * init.c (build_vtbl_address): Don't mark destructor. * class.c (finish_struct_1): Add all classes to keyed_classes if devirtualizing. libstdc++-v3/ * libsupc++/cxxabi.h (class __pbase_type_info): __pointer_catch is pure, not inline. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@212174 138bc75d-0d04-0410-961f-82ee72b054a4
2014-05-202014-05-20 Alexey Merzlyakov <alexey.merzlyakov@samsung.com>Alexey Merzlyakov
PR libstdc++/61223 Revert: 2014-05-16 Alexey Merzlyakov <alexey.merzlyakov@samsung.com> PR libstdc++/60758 * libsupc++/eh_arm.cc (__cxa_end_cleanup): Change r4 to lr in save/restore and add unwind directives. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@210650 138bc75d-0d04-0410-961f-82ee72b054a4
2014-05-172014-05-17 Marc Glisse <marc.glisse@inria.fr>Marc Glisse
* libsupc++/new_op.cc: Factor the calls to malloc, use __builtin_expect. * libsupc++/new_opnt.cc: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@210560 138bc75d-0d04-0410-961f-82ee72b054a4
2014-05-162014-05-16 Alexey Merzlyakov <alexey.merzlyakov@samsung.com>Alexey Merzlyakov
PR libstdc++/60758 * libsupc++/eh_arm.cc (__cxa_end_cleanup): Change r4 to lr in save/restore and add unwind directives. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@210515 138bc75d-0d04-0410-961f-82ee72b054a4
2014-03-31 * libsupc++/eh_ptr.cc: Improve static_assert messages.Jonathan Wakely
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@208965 138bc75d-0d04-0410-961f-82ee72b054a4
2014-03-27 PR libstdc++/60612Jonathan Wakely
* libsupc++/eh_ptr.cc: Assert __cxa_dependent_exception layout is compatible with __cxa_exception. * libsupc++/unwind-cxx.h (__cxa_dependent_exception): Add padding. Fix typos in comments. * testsuite/18_support/exception_ptr/60612-terminate.cc: New. * testsuite/18_support/exception_ptr/60612-unexpected.cc: New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@208871 138bc75d-0d04-0410-961f-82ee72b054a4
2014-03-12PR libstdc++/59392: Fix ARM EABI uncaught throw from unexpected exception ↵Roland McGrath
handler libstdc++-v3/ PR libstdc++/59392 * libsupc++/eh_call.cc (__cxa_call_unexpected): Call __do_catch with the address of a null pointer, not with a null pointer to pointer. Copy comment for this case from eh_personality.cc:__cxa_call_unexpected. * testsuite/18_support/bad_exception/59392.cc: New file. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@208519 138bc75d-0d04-0410-961f-82ee72b054a4
2014-01-27 Core DR 475Jason Merrill
PR c++/41174 PR c++/59224 * libsupc++/eh_throw.cc (__cxa_throw): Set uncaughtExceptions. * libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception) (__cxa_allocate_exception): Don't set it here. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@207129 138bc75d-0d04-0410-961f-82ee72b054a4
2014-01-02Update copyright years in libstdc++-v3/Richard Sandiford
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@206301 138bc75d-0d04-0410-961f-82ee72b054a4
2013-11-152013-11-15 Ondřej Bílka <neleai@seznam.cz>Ondřej Bílka
Jonathan Wakely <jwakely.gcc@gmail.com> * doc/xml/manual/build_hacking.xml: Fix documentation typos. * doc/xml/manual/configure.xml: Likewise. * include/bits/atomic_base.h: Fix typos in comments. * include/bits/random.h: Likewise. * include/ext/cast.h: Likewise. * libsupc++/cxxabi.h: Likewise. * testsuite/ext/pb_ds/example/hash_illegal_resize.cc: Likewise. * testsuite/tr1/5_numerical_facilities/special_functions/testcase.h: Likewise. * testsuite/util/exception/safety.h: Likewise. * testsuite/util/testsuite_containers.h: Likewise. * testsuite/util/testsuite_hooks.cc: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@204850 138bc75d-0d04-0410-961f-82ee72b054a4
2013-10-032013-10-03 Marc Glisse <marc.glisse@inria.fr>Marc Glisse
* libsupc++/del_op.cc (operator delete): Don't test for 0 before free. * libsupc++/del_opnt.cc (free): Only declare if freestanding. (operator delete): Qualify free with std::. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@203164 138bc75d-0d04-0410-961f-82ee72b054a4