diff options
author | Jason Merrill <jason@redhat.com> | 2022-04-01 09:01:30 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-04-01 10:00:26 -0400 |
commit | 86d8e0c0652ef5236a460b75c25e4f7093cc0651 (patch) | |
tree | 6685db841ca78121ca5adaa70b114fe832462e24 /gcc/cp/method.cc | |
parent | 1a172da8a3f3625d6d35675e604678ab0154bef7 (diff) | |
download | gcc-86d8e0c0652ef5236a460b75c25e4f7093cc0651.zip gcc-86d8e0c0652ef5236a460b75c25e4f7093cc0651.tar.gz gcc-86d8e0c0652ef5236a460b75c25e4f7093cc0651.tar.bz2 |
Revert "c++: delayed parse DMI [PR96645]"
The breakage from r12-7804 (in WebKit, particularly) is more of a can of
worms than I think we can address in GCC 12, so let's return to the GCC 11
status quo for now and try again in stage 1.
I think the change was correct for the current standard, but the standard
needs a fix in this area; this is CWG issue 2335.
PR c++/96645
This reverts commits r12-7804 and r12-7929.
Diffstat (limited to 'gcc/cp/method.cc')
-rw-r--r-- | gcc/cp/method.cc | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc index e0fe217..903ee66 100644 --- a/gcc/cp/method.cc +++ b/gcc/cp/method.cc @@ -2056,28 +2056,6 @@ assignable_expr (tree to, tree from) return r; } -/* An unparsed default member initializer prevents calling a defaulted default - constructor; make checking std::is_constructible ill-formed until the DMI - has been parsed, to avoid caching the wrong value. */ - -static bool -complain_about_unparsed_dmi (tree t) -{ - if (type_has_default_ctor_to_be_synthesized (t) - && TYPE_HAS_COMPLEX_DFLT (t)) - for (tree f = TYPE_FIELDS (t); f; f = DECL_CHAIN (f)) - if (TREE_CODE (f) == FIELD_DECL - && DECL_INITIAL (f) - && TREE_CODE (DECL_INITIAL (f)) == DEFERRED_PARSE) - { - error ("default member initializer for %qD required by %qs before " - "the end of its enclosing class", f, "std::is_constructible"); - inform (location_of (f), "defined here"); - return true; - } - return false; -} - /* The predicate condition for a template specialization is_constructible<T, Args...> shall be satisfied if and only if the following variable definition would be well-formed for some invented @@ -2092,8 +2070,6 @@ constructible_expr (tree to, tree from) cp_unevaluated cp_uneval_guard; if (CLASS_TYPE_P (to)) { - if (!from && complain_about_unparsed_dmi (to)) - return error_mark_node; tree ctype = to; vec<tree, va_gc> *args = NULL; if (!TYPE_REF_P (to)) |