]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/init.cc
DR 1351 Represent the unevaluated exception specification of an implicitly declared...
authorJason Merrill <jason@redhat.com>
Tue, 29 Apr 2014 18:04:50 +0000 (14:04 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 29 Apr 2014 18:04:50 +0000 (14:04 -0400)
commitb15ea3099ae6e566f715aeafb32efbd1782614b4
tree2f6939ee0e72751f47ab06c75051dd73d1f3d903
parent7cb0403f41978641d6e0954761fa0600bc2ad10c
DR 1351 Represent the unevaluated exception specification of an implicitly declared or deleted function with a simple placeholder...

DR 1351
Represent the unevaluated exception specification of an implicitly
declared or deleted function with a simple placeholder, not a list
of functions.
* cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
* except.c (unevaluated_noexcept_spec): New.
* class.c (deduce_noexcept_on_destructor): Use it.
* decl.c (check_redeclaration_exception_specification): Call
maybe_instantiate_noexcept.
(duplicate_decls): Call it before merge_types.
(start_preparsed_function): Call maybe_instantiate_noexcept.
* decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
* init.c (get_nsdmi): Factor out of perform_member_init.
* method.c (process_subob_fn): Call maybe_instantiate_noexcept.
(walk_field_subobs): Consider NSDMI for EH spec.
(get_defaulted_eh_spec): New.
(implicitly_declare_fn): Use unevaluated_noexcept_spec.
(defaulted_late_check): Defer EH checking in non-template classes.
(after_nsdmi_defaulted_late_checks): New.
* parser.c (cp_parser_class_specifier_1): Use it.
(unparsed_classes): New macro.
* parser.h (cp_unparsed_functions_entry_d): Add classes field.
* pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
Remove list-of-functions handling.
* typeck2.c (merge_exception_specifiers): Remove list-of-functions
handling and FN parameter.
* typeck.c (merge_types): Adjust.

From-SVN: r209907
17 files changed:
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.def
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/except.c
gcc/cp/init.c
gcc/cp/method.c
gcc/cp/parser.c
gcc/cp/parser.h
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/cp/typeck2.c
gcc/testsuite/g++.dg/cpp0x/nsdmi-defer6.C
gcc/testsuite/g++.dg/cpp0x/nsdmi-dr1397.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nsdmi-eh1.C