Ensure that nothrow versions of new and delete call the ordinary versions of new or delete, instead of calling malloc or free directly. These files are all compiled with -std=gnu++14 so can use noexcept and nullptr to make the code more readable. PR libstdc++/68210 * doc/xml/manual/intro.xml: Document LWG 206 change. * libsupc++/del_op.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept. * libsupc++/del_opa.cc: Likewise. * libsupc++/del_opant.cc: Likewise. * libsupc++/del_opnt.cc: Likewise. Call operator delete(ptr) instead of free(ptr). * libsupc++/del_ops.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept. * libsupc++/del_opsa.cc: Likewise. * libsupc++/del_opva.cc: Likewise. * libsupc++/del_opvant.cc: Likewise. * libsupc++/del_opvnt.cc: Likewise. Call operator delete[](ptr) instead of operator delete(ptr). * libsupc++/del_opvs.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept. * libsupc++/del_opvsa.cc: Likewise. * libsupc++/new_op.cc: Use __builtin_expect in check for zero size. * libsupc++/new_opa.cc: Use nullptr instead of literal 0. * libsupc++/new_opant.cc: Likewise. Replace _GLIBCXX_USE_NOEXCEPT with noexcept. * libsupc++/new_opnt.cc: Likewise. Call operator new(sz) instead of malloc(sz). * libsupc++/new_opvant.cc: Use nullptr and noexcept. * libsupc++/new_opvnt.cc: Likewise. Call operator new[](sz) instead of operator new(sz, nothrow). * testsuite/18_support/new_nothrow.cc: New test. From-SVN: r263478
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
Makefile.am | Loading commit data... | |
Makefile.in | Loading commit data... | |
array_type_info.cc | Loading commit data... | |
atexit_arm.cc | Loading commit data... | |
atexit_thread.cc | Loading commit data... | |
atomic_lockfree_defines.h | Loading commit data... | |
bad_alloc.cc | Loading commit data... | |
bad_array_length.cc | Loading commit data... | |
bad_array_new.cc | Loading commit data... | |
bad_cast.cc | Loading commit data... | |
bad_typeid.cc | Loading commit data... | |
class_type_info.cc | Loading commit data... | |
cxxabi.h | Loading commit data... | |
cxxabi_forced.h | Loading commit data... | |
cxxabi_init_exception.h | Loading commit data... | |
del_op.cc | Loading commit data... | |
del_opa.cc | Loading commit data... | |
del_opant.cc | Loading commit data... | |
del_opnt.cc | Loading commit data... | |
del_ops.cc | Loading commit data... | |
del_opsa.cc | Loading commit data... | |
del_opv.cc | Loading commit data... | |
del_opva.cc | Loading commit data... | |
del_opvant.cc | Loading commit data... | |
del_opvnt.cc | Loading commit data... | |
del_opvs.cc | Loading commit data... | |
del_opvsa.cc | Loading commit data... | |
dyncast.cc | Loading commit data... | |
eh_alloc.cc | Loading commit data... | |
eh_arm.cc | Loading commit data... | |
eh_atomics.h | Loading commit data... | |
eh_aux_runtime.cc | Loading commit data... | |
eh_call.cc | Loading commit data... | |
eh_catch.cc | Loading commit data... | |
eh_exception.cc | Loading commit data... | |
eh_globals.cc | Loading commit data... | |
eh_personality.cc | Loading commit data... | |
eh_ptr.cc | Loading commit data... | |
eh_term_handler.cc | Loading commit data... | |
eh_terminate.cc | Loading commit data... | |
eh_throw.cc | Loading commit data... | |
eh_tm.cc | Loading commit data... | |
eh_type.cc | Loading commit data... | |
eh_unex_handler.cc | Loading commit data... | |
enum_type_info.cc | Loading commit data... | |
exception | Loading commit data... | |
exception.h | Loading commit data... | |
exception_defines.h | Loading commit data... | |
exception_ptr.h | Loading commit data... | |
function_type_info.cc | Loading commit data... | |
fundamental_type_info.cc | Loading commit data... | |
guard.cc | Loading commit data... | |
guard_error.cc | Loading commit data... | |
hash_bytes.cc | Loading commit data... | |
hash_bytes.h | Loading commit data... | |
initializer_list | Loading commit data... | |
nested_exception.cc | Loading commit data... | |
nested_exception.h | Loading commit data... | |
new | Loading commit data... | |
new_handler.cc | Loading commit data... | |
new_op.cc | Loading commit data... | |
new_opa.cc | Loading commit data... | |
new_opant.cc | Loading commit data... | |
new_opnt.cc | Loading commit data... | |
new_opv.cc | Loading commit data... | |
new_opva.cc | Loading commit data... | |
new_opvant.cc | Loading commit data... | |
new_opvnt.cc | Loading commit data... | |
pbase_type_info.cc | Loading commit data... | |
pmem_type_info.cc | Loading commit data... | |
pointer_type_info.cc | Loading commit data... | |
pure.cc | Loading commit data... | |
si_class_type_info.cc | Loading commit data... | |
tinfo.cc | Loading commit data... | |
tinfo.h | Loading commit data... | |
tinfo2.cc | Loading commit data... | |
typeinfo | Loading commit data... | |
unwind-cxx.h | Loading commit data... | |
vec.cc | Loading commit data... | |
vmi_class_type_info.cc | Loading commit data... | |
vterminate.cc | Loading commit data... | |
vtv_stubs.cc | Loading commit data... |