diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-04 21:21:23 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-04 21:21:23 +0000 |
commit | 3644efa555cc85fc27dada414f6de71133046242 (patch) | |
tree | 45574d319c9bf599a6b62ec4994fe09f77d4a51b /gcc/cp/search.c | |
parent | 98fe9664d14d2fc65e98120de16e84bf64830074 (diff) | |
download | gcc-3644efa555cc85fc27dada414f6de71133046242.tar.gz |
Implement noexcept-specification (15.4)
* parser.c (cp_parser_exception_specification_opt): Parse it.
Give -Wdeprecated warning about throw() specs.
* pt.c (tsubst_exception_specification): Handle it.
* error.c (dump_exception_spec): Handle it.
* cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
* typeck.c (comp_except_specs): Handle compatibility rules.
Change exact parm to take an enum.
* typeck2.c (merge_exception_specifiers): Handle noexcept.
* except.c (nothrow_spec_p, type_noexcept_p): New fns.
(type_throw_all_p, build_noexcept_spec): New fns.
* cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
(comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
(cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
(noexcept_true_spec, noexcept_false_spec): New macros.
* name-lookup.c (pushdecl_maybe_friend): Adjust.
* search.c (check_final_overrider): Adjust.
* decl.c (check_redeclaration_exception_specification): Adjust.
(use_eh_spec_block): Use type_throw_all_p.
(cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
Give operator new a noexcept-specification in C++0x mode.
* tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
(cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160298 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r-- | gcc/cp/search.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 4843855bf70..e30882116bb 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -1867,7 +1867,7 @@ check_final_overrider (tree overrider, tree basefn) } /* Check throw specifier is at least as strict. */ - if (!comp_except_specs (base_throw, over_throw, 0)) + if (!comp_except_specs (base_throw, over_throw, ce_derived)) { error ("looser throw specifier for %q+#F", overrider); error (" overriding %q+#F", basefn); |