diff options
author | Jason Merrill <jason@redhat.com> | 2014-04-29 14:04:50 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2014-04-29 14:04:50 -0400 |
commit | b15ea3099ae6e566f715aeafb32efbd1782614b4 (patch) | |
tree | 2f6939ee0e72751f47ab06c75051dd73d1f3d903 /gcc/cp/cp-tree.def | |
parent | 7cb0403f41978641d6e0954761fa0600bc2ad10c (diff) | |
download | gcc-b15ea3099ae6e566f715aeafb32efbd1782614b4.zip gcc-b15ea3099ae6e566f715aeafb32efbd1782614b4.tar.gz gcc-b15ea3099ae6e566f715aeafb32efbd1782614b4.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/cp-tree.def')
-rw-r--r-- | gcc/cp/cp-tree.def | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def index 057e7ea..b4a72d6 100644 --- a/gcc/cp/cp-tree.def +++ b/gcc/cp/cp-tree.def @@ -212,9 +212,12 @@ DEFTREECODE (USING_STMT, "using_stmt", tcc_statement, 1) parsing had occurred. */ DEFTREECODE (DEFAULT_ARG, "default_arg", tcc_exceptional, 0) -/* An uninstantiated noexcept-specification. DEFERRED_NOEXCEPT_PATTERN is - the pattern from the template, and DEFERRED_NOEXCEPT_ARGS are the - template arguments to substitute into the pattern when needed. */ +/* An uninstantiated/unevaluated noexcept-specification. For the + uninstantiated case, DEFERRED_NOEXCEPT_PATTERN is the pattern from the + template, and DEFERRED_NOEXCEPT_ARGS are the template arguments to + substitute into the pattern when needed. For the unevaluated case, + those slots are NULL_TREE and we use get_defaulted_eh_spec to find + the exception-specification. */ DEFTREECODE (DEFERRED_NOEXCEPT, "deferred_noexcept", tcc_exceptional, 0) /* A template-id, like foo<int>. The first operand is the template. |