aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-06-08 17:35:02 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-06-08 17:35:02 -0400
commit1026172832d7175b52ee0ddf5ef17d7f5b803e2e (patch)
treeee6f3f833ee964ac09575df2a56cdaf0ded1d159 /gcc/cp/method.c
parent535fb6eb200870e582a7f4abf2ea929cfc7e24c6 (diff)
downloadgcc-1026172832d7175b52ee0ddf5ef17d7f5b803e2e.zip
gcc-1026172832d7175b52ee0ddf5ef17d7f5b803e2e.tar.gz
gcc-1026172832d7175b52ee0ddf5ef17d7f5b803e2e.tar.bz2
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
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index cf35b4a..9188700 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -923,7 +923,9 @@ process_subob_fn (tree fn, bool move_p, tree *spec_p, bool *trivial_p,
if (spec_p)
{
- tree raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn));
+ tree raises;
+ maybe_instantiate_noexcept (fn);
+ raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn));
*spec_p = merge_exception_specifiers (*spec_p, raises);
}
@@ -1558,7 +1560,9 @@ defaulted_late_check (tree fn)
it had been implicitly declared. */
if (DECL_DEFAULTED_IN_CLASS_P (fn))
{
- tree eh_spec = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (implicit_fn));
+ tree eh_spec;
+ maybe_instantiate_noexcept (fn);
+ eh_spec = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (implicit_fn));
if (TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn))
&& !comp_except_specs (TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn)),
eh_spec, ce_normal))