re PR c++/49107 ([C++0x][4.7 Regression] incomplete type regression with std::pair)
authorJason Merrill <jason@redhat.com>
Wed, 8 Jun 2011 21:35:02 +0000 (17:35 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 8 Jun 2011 21:35:02 +0000 (17:35 -0400)
commit1026172832d7175b52ee0ddf5ef17d7f5b803e2e
treeee6f3f833ee964ac09575df2a56cdaf0ded1d159
parent535fb6eb200870e582a7f4abf2ea929cfc7e24c6
re PR c++/49107 ([C++0x][4.7 Regression] incomplete type regression with std::pair)

PR c++/49107
* cp-tree.def (DEFERRED_NOEXCEPT): New.
* cp-tree.h (struct tree_deferred_noexcept): New.
(DEFERRED_NOEXCEPT_PATTERN, DEFERRED_NOEXCEPT_ARGS): New.
(DEFERRED_NOEXCEPT_SPEC_P): New.
(enum cp_tree_node_structure_enum): Add TS_CP_DEFERRED_NOEXCEPT.
(union lang_tree_node): Add tree_deferred_noexcept.
(maybe_instantiate_noexcept): Declare.
* cp-objcp-common.c (cp_tree_size): Handle DEFERRED_NOEXCEPT.
* error.c (dump_exception_spec): Likewise.
* cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
* ptree.c (cxx_print_xnode): Likewise.
* tree.c (cp_tree_equal): Likewise.
* decl.c (cp_tree_node_structure): Likewise.
(duplicate_decls): Call maybe_instantiate_noexcept.
* except.c (build_noexcept_spec): Handle DEFERRED_NOEXCEPT.
(nothrow_spec_p, type_noexcept_p, type_throw_all_p): Check
DEFERRED_NOEXCEPT_SPEC_P.
* typeck2.c (merge_exception_specifiers): Likewise.
* decl2.c (mark_used): Call maybe_instantiate_noexcept.
* method.c (process_subob_fn, defaulted_late_check): Likewise.
* pt.c (tsubst_exception_specification): Add defer_ok parm.
Build DEFERRED_NOEXCEPT.
(maybe_instantiate_noexcept): New.
(tsubst, regenerate_decl_from_template, instantiate_decl): Adjust.
* search.c (check_final_overrider): Call maybe_instantiate_noexcept.

From-SVN: r174820
19 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.c
gcc/cp/cp-tree.def
gcc/cp/cp-tree.h
gcc/cp/cxx-pretty-print.c
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/error.c
gcc/cp/except.c
gcc/cp/method.c
gcc/cp/pt.c
gcc/cp/ptree.c
gcc/cp/search.c
gcc/cp/tree.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/noexcept11.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/noexcept12.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/sfinae11.C