51dc660315
gcc/cp/ * cp-tree.h (enum tsubst_flags): Add tf_fndecl_type. (flag_noexcept_type, ce_type): New. * call.c (build_conv): Add ck_fnptr. (enum conversion_kind): Change ck_tsafe to ck_fnptr. (convert_like_real): Likewise. (standard_conversion): Likewise. Allow function pointer conversions for pointers to member functions. (reference_compatible_p): Allow function pointer conversions. (direct_reference_binding): Likewise. (reference_binding): Reference-compatible is no longer a subset of reference-related. (is_subseq): Also strip ck_lvalue after next_conversion. * class.c (instantiate_type): Check fnptr_conv_p. (resolve_address_of_overloaded_function): Likewise. * cvt.c (can_convert_tx_safety): Now static. (noexcept_conv_p, fnptr_conv_p, strip_fnptr_conv): New. * decl.c (flag_noexcept_type): Define. (cxx_init_decl_processing): Set it. (bad_specifiers): Check it. (grokdeclarator) [cdk_function]: Add exception-spec to type here. * lambda.c (maybe_add_lambda_conv_op): Add exception-spec to returned pointer. * mangle.c (struct globals): Add need_cxx1z_warning. (mangle_decl): Check it. (write_exception_spec): New. (write_function_type): Call it. (canonicalize_for_substitution): Handle exception spec. (write_type): Likewise. (write_encoding): Set processing_template_decl across mangling of partially-instantiated type. * pt.c (determine_specialization): Pass tf_fndecl_type. (tsubst_decl, fn_type_unification): Likewise. (tsubst): Strip tf_fndecl_type, pass it to tsubst_exception_specification. (convert_nontype_argument_function): Handle function pointer conversion. (convert_nontype_argument): Likewise. (unify, for_each_template_parm_r): Walk into noexcept-specifier. * rtti.c (ptr_initializer): Encode noexcept. * tree.c (canonical_eh_spec): New. (build_exception_variant): Use it. * typeck.c (composite_pointer_type): Handle fnptr conversion. (comp_except_specs): Compare canonical EH specs. (structural_comptypes): Call it. gcc/c-family/ * c.opt (Wc++1z-compat): New. * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type. libstdc++-v3/ * include/bits/c++config (_GLIBCXX_NOEXCEPT_PARM) (_GLIBCXX_NOEXCEPT_QUAL): New. * include/std/type_traits (is_function): Use them. * libsubc++/new (launder): Likewise. * libsupc++/cxxabi.h (__pbase_type_info::__masks): Add __noexcept_mask. * libsupc++/pbase_type_info.cc (__do_catch): Handle function pointer conversion. libiberty/ * cp-demangle.c (is_fnqual_component_type): New. (d_encoding, d_print_comp_inner, d_print_mod_list): Use it. (FNQUAL_COMPONENT_CASE): New. (d_make_comp, has_return_type, d_print_comp_inner) (d_print_function_type): Use it. (next_is_type_qual): New. (d_cv_qualifiers, d_print_mod): Handle noexcept and throw-spec. include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_NOEXCEPT, DEMANGLE_COMPONENT_THROW_SPEC. From-SVN: r241944 |
||
---|---|---|
.. | ||
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 | ||
cxxabi_forced.h | ||
cxxabi_init_exception.h | ||
cxxabi.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 | ||
eh_alloc.cc | ||
eh_arm.cc | ||
eh_aux_runtime.cc | ||
eh_call.cc | ||
eh_catch.cc | ||
eh_exception.cc | ||
eh_globals.cc | ||
eh_personality.cc | ||
eh_ptr.cc | ||
eh_term_handler.cc | ||
eh_terminate.cc | ||
eh_throw.cc | ||
eh_tm.cc | ||
eh_type.cc | ||
eh_unex_handler.cc | ||
enum_type_info.cc | ||
exception | ||
exception_defines.h | ||
exception_ptr.h | ||
exception.h | ||
function_type_info.cc | ||
fundamental_type_info.cc | ||
guard_error.cc | ||
guard.cc | ||
hash_bytes.cc | ||
hash_bytes.h | ||
initializer_list | ||
Makefile.am | ||
Makefile.in | ||
nested_exception.cc | ||
nested_exception.h | ||
new | ||
new_handler.cc | ||
new_op.cc | ||
new_opa.cc | ||
new_opant.cc | ||
new_opnt.cc | ||
new_opv.cc | ||
new_opva.cc | ||
new_opvant.cc | ||
new_opvnt.cc | ||
pbase_type_info.cc | ||
pmem_type_info.cc | ||
pointer_type_info.cc | ||
pure.cc | ||
si_class_type_info.cc | ||
tinfo2.cc | ||
tinfo.cc | ||
tinfo.h | ||
typeinfo | ||
unwind-cxx.h | ||
vec.cc | ||
vmi_class_type_info.cc | ||
vterminate.cc | ||
vtv_stubs.cc |