gcc/libstdc++-v3/libsupc++
Jonathan Wakely 710508c7b1 libstdc++: Fix multiple definitions of std::exception_ptr functions [PR 97729]
This fixes some multiple definition errors caused by the changes for
PR libstdc++/90295. The previous solution for inlining the members of
std::exception_ptr but still exporting them from the library was to
suppress the 'inline' keyword on those functions when compiling
libsupc++/eh_ptr.cc, so they get defined in that file. That produces ODR
violations though, because there are now both inline and non-inline
definitions in the library, due to the use of std::exception_ptr in
other files sucg as src/c++11/future.cc.

The new solution is to define all the relevant members as 'inline'
unconditionally, but use __attribute__((used)) to cause definitions to
be emitted in libsupc++/eh_ptr.cc as before. This doesn't quite work
however, because PR c++/67453 means the attribute is ignored on
constructors and destructors. As a workaround, the old solution
(conditionally inline) is still used for those members, but they are
given the always_inline attribute so that they aren't emitted in
src/c++11/future.o as inline definitions.

libstdc++-v3/ChangeLog:

	PR libstdc++/97729
	* include/std/future (__basic_future::_M_get_result): Use
	nullptr for null pointer constant.
	* libsupc++/eh_ptr.cc (operator==, operator!=): Remove
	definitions.
	* libsupc++/exception_ptr.h (_GLIBCXX_EH_PTR_USED): Define
	macro to conditionally add __attribute__((__used__)).
	(operator==, operator!=, exception_ptr::exception_ptr())
	(exception_ptr::exception_ptr(const exception_ptr&))
	(exception_ptr::~exception_ptr())
	(exception_ptr::operator=(const exception_ptr&))
	(exception_ptr::swap(exception_ptr&)): Always define as
	inline. Add macro to be conditionally "used".
2020-11-05 18:01:25 +00:00
..
Makefile.am libstdc++: Remove redundant -std=gnu++1z flags from makefile 2020-09-25 12:50:17 +01:00
Makefile.in libstdc++: Remove redundant -std=gnu++1z flags from makefile 2020-09-25 12:50:17 +01:00
array_type_info.cc
atexit_arm.cc
atexit_thread.cc
atomic_lockfree_defines.h
bad_alloc.cc
bad_array_length.cc
bad_array_new.cc
bad_cast.cc
bad_typeid.cc
class_type_info.cc
compare libstdc++: Update __cpp_lib_three_way_comparison macro 2020-04-20 17:50:10 +01:00
cxxabi.h libstdc++: Fix the return type of __cxa_finalize 2020-05-04 23:07:19 +01:00
cxxabi_forced.h
cxxabi_init_exception.h
del_op.cc
del_opa.cc
del_opant.cc
del_opnt.cc
del_ops.cc
del_opsa.cc
del_opv.cc
del_opva.cc
del_opvant.cc
del_opvnt.cc
del_opvs.cc
del_opvsa.cc
dyncast.cc libstdc++: Avoid negating a size_t [pr 94747] 2020-05-04 10:08:13 -07:00
eh_alloc.cc
eh_arm.cc
eh_atomics.h
eh_aux_runtime.cc
eh_call.cc libstdc++-v3/libsupc++/eh_call.cc: Avoid "set but not used" warning 2020-09-11 13:00:29 +00:00
eh_catch.cc
eh_exception.cc
eh_globals.cc
eh_personality.cc
eh_ptr.cc libstdc++: Fix multiple definitions of std::exception_ptr functions [PR 97729] 2020-11-05 18:01:25 +00:00
eh_term_handler.cc
eh_term_handler.h
eh_terminate.cc
eh_throw.cc
eh_tm.cc
eh_type.cc
eh_unex_handler.cc
enum_type_info.cc
exception
exception.h
exception_defines.h
exception_ptr.h libstdc++: Fix multiple definitions of std::exception_ptr functions [PR 97729] 2020-11-05 18:01:25 +00:00
function_type_info.cc
fundamental_type_info.cc
guard.cc libstdc++: Use __libc_single_threaded to optimise atomics [PR 96817] 2020-09-26 20:32:36 +01:00
guard_error.cc
hash_bytes.cc
hash_bytes.h
initializer_list
nested_exception.cc
nested_exception.h
new PR c++/97201 - ICE in -Warray-bounds writing to result of operator new(0) 2020-10-12 09:36:26 -06:00
new_handler.cc
new_op.cc
new_opa.cc libstdc++: Fix declarations of memalign etc. for freestanding [PR 97570] 2020-10-26 12:02:50 +00:00
new_opant.cc
new_opnt.cc libstdc++: Add comment to nothrow new explaining catch (...) 2020-10-28 13:19:21 +00:00
new_opv.cc
new_opva.cc
new_opvant.cc
new_opvnt.cc libstdc++: Break header cycle between <new> and <exception> 2020-09-02 13:56:32 +01:00
pbase_type_info.cc
pmem_type_info.cc
pointer_type_info.cc
pure.cc
si_class_type_info.cc
tinfo.cc
tinfo.h
tinfo2.cc
typeinfo libstdc++: Remove std::type_info::operator!= for C++20 2020-02-20 11:30:19 +00:00
unwind-cxx.h
vec.cc
vmi_class_type_info.cc
vterminate.cc
vtv_stubs.cc