DR 1351
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Apr 2014 18:04:50 +0000 (18:04 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Apr 2014 18:04:50 +0000 (18:04 +0000)
commitf2c1aabc34bf9104f92557b39920ccb896a3f551
tree2f6939ee0e72751f47ab06c75051dd73d1f3d903
parente1506184f16d3ea8b5f199c6c93c277bafaec9e2
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209907 138bc75d-0d04-0410-961f-82ee72b054a4
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