Commit Graph

492 Commits

Author SHA1 Message Date
Jonathan Wakely 95f2fd9c5d nested_exception.h: Do not try to derive from final classes.
* libsupc++/nested_exception.h: Do not try to derive from final
	classes.
	* testsuite/18_support/nested_exception/throw_with_nested.cc: Test
	final class.

From-SVN: r221476
2015-03-17 14:24:55 +00:00
Caroline Tice 8be349eea9 Committing generated configure & Makefile.in pieces of VTV Cygwin patch (from Patrick Wollgast).
Committing generated configure & Makefile.in pieces of
VTV Cygwin patch (from Patrick Wollgast).  Forgot to 
commit these with the rest of the patch.

From-SVN: r220254
2015-01-29 08:47:25 -08:00
Caroline Tice f7f049fa46 Committing VTV Cygwin patch for Patrick Wollgast
* 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.

From-SVN: r220232
2015-01-29 00:03:56 -08:00
Jonathan Wakely 739cdc9041 re PR libstdc++/64828 (libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat])
PR libstdc++/64828
	* libsupc++/Makefile.am: Compile del_opvs.cc as C++14.
	* libsupc++/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.

From-SVN: r220207
2015-01-28 15:02:28 +00:00
Richard Biener 8aa33fadbe re PR libstdc++/64798 (g++.old-deja/g++.eh/badalloc1.C FAILs)
2015-01-28  Richard Biener  <rguenther@suse.de>

	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.

From-SVN: r220201
2015-01-28 09:53:39 +00:00
Richard Biener cce93c76ba re PR libstdc++/64535 (Emergency buffer for exception allocation too small)
2015-01-22  Richard Biener  <rguenther@suse.de>

	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.

From-SVN: r219988
2015-01-22 09:21:48 +00:00
Andreas Tobler 4c470097be unwind-arm-common.h: Revert previous commit.
gcc:
    * ginclude/unwind-arm-common.h: Revert previous commit.

libstdc++-v3:
    * libsupc++/unwind-cxx.h: Revert previous commit.

From-SVN: r219392
2015-01-09 15:22:19 +01:00
Andreas Tobler 82a19768cb configure.ac: Don't add ${libgcj} for arm*-*-freebsd*.
toplevel:

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

From-SVN: r219388
2015-01-09 15:06:02 +01:00
Jonathan Wakely 23608da4db Makefile.am: Compile del_ops.cc as C++14.
* libsupc++/Makefile.am: Compile del_ops.cc as C++14.
	* libsupc++/Makefile.in: Regenerate.

From-SVN: r219317
2015-01-07 17:08:11 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Jonathan Wakely 34a2b7558b New std::string implementation.
* 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.

From-SVN: r218964
2014-12-19 18:16:39 +00:00
Jason Merrill 20b06addf9 N3778: Sized Deallocation
N3778: Sized Deallocation
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.

From-SVN: r218755
2014-12-15 13:31:40 -05:00
Jonathan Wakely 0f3d27f01a re PR libstdc++/64276 (would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available)
PR libstdc++/64276
	* 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.

From-SVN: r218679
2014-12-12 15:58:49 +00:00
Jonathan Wakely 8f596ff51a re PR libstdc++/64241 (make_exception_ptr returns garbage with -fno-exceptions)
PR libstdc++/64241
	* libsupc++/exception_ptr.h: Return empty object when exceptions are
	disabled.
	* testsuite/18_support/exception_ptr/64241.cc: New.

From-SVN: r218675
2014-12-12 15:10:08 +00:00
Jason Merrill 94a073b251 Remove N3639 "array of runtime length" from -std=c++14.
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.

From-SVN: r218655
2014-12-11 22:49:13 -05:00
Jason Merrill 4666e1fb92 dyncast.cc (__dynamic_cast): Handle mid-destruction dynamic_cast more gracefully.
* libsupc++/dyncast.cc (__dynamic_cast): Handle mid-destruction
	dynamic_cast more gracefully.

From-SVN: r215350
2014-09-18 08:34:43 -04:00
Tony Wang 0876bdf57b re PR libgcc/56846 (_Unwind_Backtrace on ARM and noexcept)
2014-09-10  Tony Wang  <tony.wang@arm.com>

    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

From-SVN: r215101
2014-09-10 04:45:32 +00:00
Yaakov Selkowitz 1ed3ba0549 os_defines.h (_GLIBCXX_THREAD_ATEXIT_WIN32): Define.
2014-08-19  Yaakov Selkowitz  <yselkowi@redhat.com>
	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.


Co-Authored-By: Kai Tietz <ktietz@redhat.com>

From-SVN: r214163
2014-08-19 17:25:12 +02:00
Jonathan Wakely 2ce8cb99a6 re PR libstdc++/62154 (std::throw_with_nested should not require a polymorphic type)
PR libstdc++/62154
	* 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.

From-SVN: r214025
2014-08-15 16:22:44 +01:00
Zifei Tong a7f930e7c3 atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add _GLIBCXX_ prefix to macro.
2014-08-01  Zifei Tong  <zifeitong@gmail.com>

	* libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
	_GLIBCXX_ prefix to macro.

From-SVN: r213504
2014-08-01 20:45:56 +01:00
Jason Merrill a6ea72bf82 re PR libstdc++/61728 (lost symbol FUNC:_ZNK10__cxxabiv117__pbase_type_info15__pointer_catchEPKS0_PPvj@@CXXABI_1.3)
PR libstdc++/61728
	* libsupc++/cxxabi.h: Define __pbase_type_info::__pointer_catch here.
	* libsupc++/tinfo.h: Not here.

From-SVN: r212413
2014-07-09 18:21:49 -04:00
Jason Merrill 5796bf3422 re PR ipa/61659 (Extra undefined symbol because of devirtualization)
PR c++/61659
	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.

From-SVN: r212174
2014-06-30 16:20:55 -04:00
Alexey Merzlyakov a852a67c02 re PR target/61223 (libstdc++ build fail due to pop lr register)
2014-05-20  Alexey Merzlyakov  <alexey.merzlyakov@samsung.com>

	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.

From-SVN: r210650
2014-05-20 17:25:26 +00:00
Marc Glisse 80333d3d23 new_op.cc: Factor the calls to malloc, use __builtin_expect.
2014-05-17  Marc Glisse  <marc.glisse@inria.fr>

	* libsupc++/new_op.cc: Factor the calls to malloc, use __builtin_expect.
	* libsupc++/new_opnt.cc: Likewise.

From-SVN: r210560
2014-05-17 17:47:36 +00:00
Alexey Merzlyakov 2a2794f7be re PR libstdc++/60758 (Infinite backtrace in __cxa_end_cleanup)
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.

From-SVN: r210515
2014-05-16 13:16:33 +00:00
Jonathan Wakely 0812493fc5 * libsupc++/eh_ptr.cc: Improve static_assert messages.
From-SVN: r208965
2014-03-31 19:16:14 +01:00
Jonathan Wakely 3941b26033 re PR libstdc++/60612 (Throwing exception, catching and rethrowing (std::exception_ptr) in destructor leads to segfault)
PR libstdc++/60612
	* 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.

From-SVN: r208871
2014-03-27 18:07:25 +00:00
Roland McGrath 90021b558c PR libstdc++/59392: Fix ARM EABI uncaught throw from unexpected exception 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.

Co-Authored-By: Mark Seaborn <mseaborn@google.com>

From-SVN: r208519
2014-03-12 22:42:13 +00:00
Jason Merrill ccc2e73ce7 Core DR 475 PR c++/41174 PR c++/59224
Core DR 475
	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.

From-SVN: r207129
2014-01-27 08:57:39 -05:00
Richard Sandiford aa118a03c4 Update copyright years in libstdc++-v3/
From-SVN: r206301
2014-01-02 22:30:10 +00:00
Ondřej Bílka 64e1ab1168 build_hacking.xml: Fix documentation typos.
2013-11-15  Ondřej Bílka <neleai@seznam.cz>
	    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.

Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>

From-SVN: r204850
2013-11-15 16:33:59 +00:00
Marc Glisse fc7657bb38 del_op.cc (operator delete): Don't test for 0 before free.
2013-10-03  Marc Glisse  <marc.glisse@inria.fr>

	* 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::.

From-SVN: r203164
2013-10-03 16:16:40 +00:00
Caroline Tice 2077db1be5 Commit the vtable verification feature.
Commit the vtable verification feature.  This feature is designed to
detect, at run time, if/when the vtable pointer in a C++ object has
been corrupted, before allowing virtual calls through that pointer. 
If pointer corruption is detected, execution of the program is halted.

libstdc++-v3 ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * fragment.am: Add XTEMPLATE_FLAGS.
        * configure.ac: Add definitions for --enable-vtable-verify.
        * acinclude.m4:  Add --enable-vtable-verify and
        --disable-vtable-verify; define --enable-vtable-verify; define
        VTV_CXXFLAGS, VTV_PCH_CXXFLAGS and VTV_CXXLINKFLAGS.
        * config/abi/pre/gnu.ver: Export symbols for vtable verification.
        * libsupc++/Makefile.am: Define vtv_sources and add it to
        libsupc___la_SOURCES and libsupc__convenience_la_SOURCES.
        * libsupc++/vtv_stubs.cc: New file.
        * include/Makefile.am: Add VTV_PCH_CXXFLAGS to PCHFLAGS.
        * src/Makefile.am: Add VTV_CXXFLAGS to AM_CXXFLAGS; add
        VTV_CXXLINKFLAGS to CXXLINK.
        * src/c++98/Makefile.am: Comment out XTEMPLATE_FLAGS; add VTV_CXXFLAGS
        to AM_CXXFLAGS; add VTV_CXXXLINKFLAGS to CXXLINK.
        * src/C++11/Makefile.am: Ditto.
        * doc/xml/manual/configure.xml: Add entry for --enable-vtable-verify.
        * scripts/testsuite_flags.in: Add cxxvtvflags to Usage; cause
        cxxvtvflags to use VTV_CXXFLAGS and VTV_CXXLINKFLAGS.
        * testsuite/lib/libstdc++.exp: Add cxxvtvflags; add code to locate
        libvtv if --enable-vtable-verify was used; set cxxvtvflags; add
        cxxvtvflags to cxx_final.
        * testsuite/18_support/bad_exception/23591_thread-1.c: Add
        -fvtable-verify=none to compiler flags.
        * testsuite/17_intro/freestanding.cc: Add -fvtable-verify=none
        to compiler flags.
        * configure: Regenerated.
        * Makefile.in: Regenerated.
        * python/Makefile.in: Regenerated.
        * include/Makefile.in: Regenerated.
        * libsupc++/Makefile.in: Regenerated.
        * config.h.in: Regenerated.
        * po/Makefile.in: Regenerated.
        * src/Makefile.in: Regenerated.
        * src/c++98/Makefile.in: Regenerated.
        * src/c++11/Makefile.in: Regenerated.
        * doc/Makefile.in: Regenerated.
        * testsuite/Makefile.in: Regenerated.

top level ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * configure.ac: Add target-libvtv to target_libraries; disable libvtv
        on non-linux systems; add target-libvtv to noconfigdirs; add
        libsupc++/.libs to C++ library search paths.
        * configure: Regenerated.
        * Makefile.def: Add libvtv to target_modules; make libvtv depend on
        libstdc++ and libgcc.
        * Makefile.in: Regenerated.

include/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * vtv-change-permission.h: New file.

contrib/ChangeLog:
2013-08-06  Caroline Tice4  <cmtice@google.com>

        * gcc_update: Add libvtv files.

libgcc/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        config.host (extra_parts): Add vtv_start.o, vtv_end.o
        vtv_start_preinit.o and vtv_end_preinit.o.
        configure.ac: Add code to check/set enable_vtable_verify.
        Makefile.in: Add rules to build vtv_*.o, if enable_vtable_verify is
        true.
        vtv_start_preinit.c: New file.
        vtv_end_preinit.c: New file.
        vtv_start.c: New file.
        vtv_end.c: New file.
        configure: Regenerated.

gcc/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * gcc.c (VTABLE_VERIFICATION_SPEC): New definition.
        (LINK_COMMAND_SPEC): Add VTABLE_VERIFICATION_SPEC.
        * tree-pass.h: Add pass_vtable_verify.
        * varasm.c (assemble_variable): Add code to properly set the comdat
        section and name for the .vtable_map_vars section.
        (assemble_vtyv_preinit_initializer): New function.
        (default_sectin_type_flags):  Make sure .vtable_map_vars section has
        LINK_ONCE flag.
        * output.h: Add function decl for assemble_vtv_preinit_initializer.
        * vtable-verify.c: New file.
        * vtable-verify.h: New file.
        * flag-types.h (enum vtv_priority): Defintions for flag_vtable_verify
        initialiation levels.
        * timevar.def (TV_VTABLE_VERIFICATION): New definition.
        * passes.def: Insert pass_vtable_verify.
        * aclocal.m4: Reorder includes.
        * doc/invoke.texi: Add documentation for the flags -fvtable-verify=,
	-fvtv-debug and -fvtv-counts.
        * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add vtv_start*.o,
as appropriate, if -fvtable-verify=... is used.
        (GNU_USER_TARGET_ENDFILE_SPEC): Add vtv_end*.o as appropriate, if
        -fvtable-verify=... is used.
        * Makefile.in (OBJS):  Add vtable-verify.o to list.
        (vtable-verify.o): Add new build rule.
        (GTFILES): Add vtable-verify.c to list.
        * common.opt (fvtable-verify=): New flag.
        (vtv_priority): Values for fvtable-verify= flag.
        (fvtv-counts): New flag.
(fvtv-debug): New flag.
        * tree.h (save_vtable_map_decl): New extern function decl.


gcc/cp/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * Make-lang.in (*CXX_AND_OBJCXX_OBJS):  Add vtable-class-hierarchy.o to
        list.
        (vtable-class-hierarchy.o): Add build rule.
        * cp-tree.h (vtv_start_verification_constructor_init_function): New
        extern function decl.
        (vtv_finish_verification_constructor_init_function): New extern
        function decl.
        (build_vtbl_address): New extern function decl.
        (get_mangled_vtable_map_var_name): New extern function decl.
        (vtv_compute_class_hierarchy_transitive_closure): New extern function
        decl.
        (vtv_generate_init_routine): New extern function decl.
        (vtv_save_class_info): New extern function decl.
        (vtv_recover_class_info): New extern function decl.
        (vtv_build_vtable_verify_fndecl): New extern function decl.
        * class.c (finish_struct_1): Add call to vtv_save_class_info if
        flag_vtable_verify is true.
        * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
        * vtable-class-hierarchy.c: New file.
        * mangle.c (get_mangled_vtable_map_var_name):  New function.
        * decl2.c (start_objects): Update function comment.
        (cp_write_global_declarations): Call vtv_recover_class_info,
        vtv_compute_class_hierarchy_transitive_closure and
        vtv_build_vtable_verify_fndecl, before calling
        finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
        flag_vtable_verify is true.
        (vtv_start_verification_constructor_init_function): New function.
        (vtv_finish_verification_constructor_init_function): New function.
        * init.c (build_vtbl_address): Remove static qualifier from function.

libvtv/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        Initial check-in of new vtable verification feature.
        * configure.ac : New file.
        * acinclude.m4 : New file.
        * Makefile.am : New file.
        * aclocal.m4 : New file.
        * configure.tgt : New file.
        * configure: New file (generated).
        * Makefile.in: New file (generated).
        * vtv_set.h : New file.
        * vtv_utils.cc : New file.
        * vtv_utils.h : New file.
        * vtv_malloc.cc : New file.
        * vtv_rts.cc : New file.
        * vtv_malloc.h : New file.
        * vtv_rts.h : New file.
        * vtv_fail.cc : New file.
        * vtv_fail.h : New file.
        * vtv_map.h : New file.
        * scripts/run-testsuite.sh : New file.
        * scripts/sum-vtv-counts.c : New file.
        * testsuite/parts-test-main.h : New file.
        * testusite/dataentry.cc : New file.
        * testsuite/temp_deriv.cc : New file.
        * testsuite/register_pair.cc : New file.
        * testsuite/virtual_inheritance.cc : New file.
        * testsuite/field-test.cc : New file.
        * testsuite/nested_vcall_test.cc : New file.
        * testsuite/template-list-iostream.cc : New file.
        * testsuite/register_pair_inserts.cc : New file.
        * testsuite/register_pair_inserts_mt.cc : New file.
        * testsuite/event.list : New file.
        * testsuite/parts-test-extra-parts-views.cc : New file.
        * testsuite/parts-test-extra-parts-views.h : New file.
        * testsuite/environment-fail-32.s : New file.
        * testsuite/parts-test-extra-parts.h : New file.
        * testsuite/temp_deriv2.cc : New file.
        * testsuite/dlopen_mt.cc : New file.
        * testsuite/event.h : New file.
        * testsuite/template-list.cc : New file.
        * testsuite/replace-fail.cc : New file.
        * testsuite/Makefile.am : New file.
        * testsuite/Makefile.in: New file (generated).
        * testsuite/mempool_negative.c : New file.
        * testsuite/parts-test-main.cc : New file.
        * testsuite/event-private.cc : New file.
        * testsuite/thunk.cc : New file.
        * testsuite/event-defintiions.cc : New file.
        * testsuite/event-private.h : New file.
        * testsuite/parts-test.list : New file.
        * testusite/register_pair_mt.cc : New file.
        * testsuite/povray-derived.cc : New file.
        * testsuite/event-main.cc : New file.
        * testsuite/environment.cc : New file.
        * testsuite/template-list2.cc : New file.
        * testsuite/thunk_vtable_map_attack.cc : New file.
        * testsuite/parts-test-extra-parts.cc : New file.
        * testsuite/environment-fail-64.s : New file.
        * testsuite/dlopen.cc : New file.
        * testsuite/so.cc : New file.
        * testsuite/temp_deriv3.cc : New file.
        * testsuite/const_vtable.cc : New file.
        * testsuite/mempool_positive.c : New file.
        * testsuite/dup_name.cc : New file.

From-SVN: r201555
2013-08-06 20:38:59 -07:00
Jason Merrill 16a1d8fe29 re PR libstdc++/57914 (Memory leak in __cxa_thread_atexit when using thread_local)
PR libstdc++/57914
	* libsupc++/atexit_thread.cc (run): Delete cleanup elts.

From-SVN: r201146
2013-07-22 15:43:27 -04:00
Benjamin Kosnik 61a359f6aa Makefile.am (sources): Add bad_array_length.cc, bad_array_new.cc.
2013-05-13  Benjamin Kosnik  <bkoz@redhat.com>

	* libsupc++/Makefile.am (sources): Add bad_array_length.cc,
	bad_array_new.cc.
	* libsupc++/Makefile.in: Regenerate.
	* libsupc++/bad_array_length.cc: Tweak.
	* libsupc++/bad_array_new.cc: Tweak.

From-SVN: r198853
2013-05-13 22:06:28 +00:00
Jason Merrill 0138d6b24f N3639 C++1y VLA support
gcc/
	* gimplify.c (gimplify_vla_decl): Don't touch an existing
	DECL_VALUE_EXPR.
gcc/cp/
	* decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
	(check_array_initializer): Allow VLA init.
	(reshape_init_array_1): Adjust.
	(cp_finish_decl): Check for invalid VLA length.
	* typeck2.c (process_init_constructor_array): Adjust.
	(store_init_value): Use build_vec_init for VLAs.
	* semantics.c (add_capture): Capture VLA as ptr+len.
	(vla_capture_type): New.
	(build_capture_proxy): Rebuild the VLA.
	* typeck.c (build_simple_component_ref): Split out from...
	(build_ptrmemfunc_access_expr): ...here.
	* tree.c (array_of_runtime_bound_p): New.
	* init.c (throw_bad_array_length): New.
	(build_vec_init): Use it.
	* parser.c (cp_convert_range_for): When iterating over a VLA,
	use it directly rather than bind a reference.
	* cp-tree.h: Declare new functions.
libstdc++-v3/
	* libsupc++/new: Add std::bad_array_length.
	* libsupc++/bad_array_length.cc: New.
	* libsupc++/eh_aux_runtime.cc: Add __cxa_bad_array_length.
	* libsupc++/Makefile.in: Build them.
	* config/abi/pre/gnu.ver: Add new symbols.
	* config/abi/pre/gnu-versioned-namespace.ver: Add new symbols.

From-SVN: r198745
2013-05-09 12:43:36 -04:00
Jason Merrill 7d5e76c8de Core 624/N2932: Throw bad_array_new_length on overflow
in array new size calculation.

libstdc++-v3/
	* libsupc++/new: Add std::bad_array_new_length.
	* libsupc++/bad_array_new.cc: New.
	* libsupc++/eh_aux_runtime.cc: Add __cxa_throw_bad_array_new_length.
	* libsupc++/Makefile.in: Build them.
	* config/abi/pre/gnu.ver: Add new symbols.
	* config/abi/pre/gnu-versioned-namespace.ver: Add new symbols.
gcc/cp/
	* init.c (throw_bad_array_new_length): New.
	(build_new_1): Use it.  Don't warn about braced-init-list.
	(build_vec_init): Use it.
	* call.c (build_operator_new_call): Use it.

From-SVN: r198731
2013-05-08 23:58:00 -04:00
Jonathan Wakely ec98d01014 re PR libstdc++/56905 ([C++11][DR 1130] std::copy_exception should be removed or no longer be used)
PR libstdc++/56905
	* libsupc++/exception_ptr.h (copy_exception): Deprecate and
	move implementation to make_exception_ptr.
	* include/std/future (_State_base::_M_break_promise): Replace
	copy_exception with make_exception_ptr.
	* testsuite/18_support/exception_ptr/move.cc: Likewise.
	* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
	* testsuite/30_threads/future/members/get2.cc: Likewise.
	* testsuite/30_threads/promise/members/set_exception.cc: Likewise.
	* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
	* testsuite/30_threads/promise/members/set_value2.cc: Likewise.
	* testsuite/30_threads/shared_future/members/get2.cc: Likewise.

From-SVN: r198265
2013-04-24 23:00:16 +01:00
Jason Merrill 1e8c490759 * libsupc++/initializer_list: Fix typos.
From-SVN: r198248
2013-04-24 11:04:33 -04:00
Jonathan Wakely 7e20f4b022 re PR libstdc++/56841 (ld: Unsatisfied symbol "__atomic_exchange_8" in file /test/gnu/gcc/objdir/prev-hppa64-hp-hpux11.11/libstdc++-v3/src/.libs/libstdc++.a[eh_terminate.o])
PR libstdc++/56841
	* libsupc++/eh_ptr.cc (rethrow_exception): Use get_unexpected() and
	get_terminate() accessors.
	* libsupc++/eh_throw.cc (__cxa_throw): Likewise.
	* libsupc++/eh_terminate.cc: Use mutex when atomic builtins not
	available.
	* libsupc++/new_handler.cc: Likewise.

From-SVN: r197512
2013-04-05 11:03:04 +01:00
Jonathan Wakely dca77a8a1b exception (get_terminate(), [...]): Declare.
* libsupc++/exception (get_terminate(), get_unexpected()): Declare.
	* libsupc++/eh_terminate.cc (get_terminate() , set_unexpected()):
	Define.
	(set_terminate(terminate_handler)): Set atomically.
	(set_unexpected(terminate_handler)): Likewise.
	* libsupc++/new (get_new_handler()): Declare.
	* libsupc++/new_handler.cc (get_new_handler()): Define.
	(set_new_handler(new_handler)): Set atomically.
	(__new_handler): Use internal linkage.
	* libsupc++/new_op.cc (operator new): Use get_new_handler().
	* libsupc++/new_opnt.cc (operator new): Likewise.
	* acinclude.m4: Bump libtool_VERSION to 6:19:0.
	* configure: Regenerate.
	* libsupc++/Makefile.am: Compile above files with -std=gnu++11.
	* libsupc++/Makefile.in: Regenerate.
	* config/abi/pre/gnu.ver: Add new exports.
	* doc/xml/manual/status_cxx2011.xml: Update.
	* testsuite/18_support/headers/exception/synopsis.cc: Check accessors
	for handlers.
	* testsuite/18_support/headers/new/synopsis.cc: Likewise.
	* testsuite/18_support/new_handler.cc: New.
	* testsuite/18_support/terminate_handler.cc: New.
	* testsuite/18_support/unexpected_handler.cc: New.

From-SVN: r197380
2013-04-03 01:08:54 +01:00
Jonathan Wakely c49cec9348 re PR libstdc++/56468 (Clang exposes bug with unexpected forward-declaration of type_info)
PR libstdc++/56468
	* libsupc++/exception_ptr.h (type_info): Declare.

From-SVN: r196709
2013-03-16 20:01:16 +00:00
Tom Tromey 83c214a835 unwind-cxx.h: Include sys/sdt.h if detected.
* libsupc++/unwind-cxx.h: Include sys/sdt.h if detected.
	(PROBE2): New macro.
	* libsupc++/eh_throw.cc (__cxa_throw, __cxa_rethrow): Add probe.
	* libsupc++/eh_catch.cc (__cxa_begin_catch): Add probe.
	* configure.ac: Check for sys/sdt.h.
	* configure, config.h.in: Rebuild.

From-SVN: r196674
2013-03-15 09:55:07 +01:00
Jason Merrill bed152e374 configure.ac: Check for __cxa_thread_atexit_impl.
* configure.ac: Check for __cxa_thread_atexit_impl.
	* libsupc++/atexit_thread.cc (__cxa_thread_atexit): Just forward
	to it if available.
	* config.h.in, configure: Regenerate.

From-SVN: r196276
2013-02-25 23:39:04 -05:00
Richard Sandiford 405feeb871 Update copyright in libstdc++-v3.
From-SVN: r195701
2013-02-03 17:54:05 +00:00
Jakub Jelinek 90d04a445c Update Copyright years for files modified in 2011 and/or 2012.
From-SVN: r194903
2013-01-04 13:49:55 +01:00
Kai Tietz 3cc6dd4dce os_defines.h (_GLIBCXX_LLP64): Define if llp64 abi is used.
* config/os/mingw32/os_defines.h (_GLIBCXX_LLP64): Define if llp64
	abi is used.
	* config/os/mingw32-w64/os_defines.h: Likewise.
	* libsupc++/cxxabi.h (__base_class_type_info): Adjust
	type of __offset_flags for llp64.
	* libsupc++/eh_alloc.cc (EMERGENCY_OBJ_SIZE): Define proper
	for llp64 abi.
	(EMERGENCY_OBJ_COUNT): Likewise.
	(bitmask_type): Likewise.
	* libsupc++/hash_bytes.cc (_Hash_bytes): Handle llp64.

From-SVN: r194658
2012-12-21 11:12:48 +01:00
Jonathan Wakely 3c523cf8a8 re PR libstdc++/55631 (Several ext/ headers can not be #included on their own)
PR libstdc++/55631
	* include/ext/alloc_traits.h: Include missing header.
	* include/ext/pointer.h: Likewise.
	* include/ext/string_conversions.h: Require C++11.
	* libsupc++/initializer_list: Reindent.

From-SVN: r194429
2012-12-11 22:28:01 +00:00
Kai Tietz 02f9e21a26 re PR target/55445 (Always defined __SEH__ when build from trunk)
PR target/55445
        * libsupc++/eh_personaltity.cc (__SEH__): Additional check
        for not being SjLj.

From-SVN: r193929
2012-11-29 10:39:49 +01:00
Jason Merrill 734f50238f * many: Replace uses of __GXX_EXPERIMENTAL_CXX0X__ with __cplusplus.
From-SVN: r193392
2012-11-10 12:27:22 -05:00