File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -664,7 +664,8 @@ Bug Fixes in This Version
664664- Fixed a failed assertion when using ``__attribute__((noderef)) `` on an
665665 ``_Atomic ``-qualified type (#GH116124).
666666- No longer incorrectly diagnosing use of a deleted destructor when the
667- selected overload of ``operator delete `` for that type is a destroying delete.
667+ selected overload of ``operator delete `` for that type is a destroying delete
668+ (#GH46818).
668669
669670Bug Fixes to Compiler Builtins
670671^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -146,17 +146,17 @@ namespace dtor_access {
146146 struct S {
147147 void operator delete (S *p, std::destroying_delete_t );
148148 private:
149- ~S (); // expected-note {{here}}
149+ ~S ();
150150 };
151151
152- // FIXME: PR47474: GCC accepts this, and it seems somewhat reasonable to
153- // allow, even though [expr.delete]p12 says this is ill-formed .
154- void f () { delete new S; } // expected-error {{calling a private destructor}}
152+ // C++20 [expr.delete]p12 says this is ill-formed, but GCC accepts and we
153+ // filed CWG2889 to resolve in the same way .
154+ void f () { delete new S; }
155155
156156 struct T {
157157 void operator delete (T *, std::destroying_delete_t );
158158 protected:
159- virtual ~T (); // expected-note {{here}}
159+ virtual ~T ();
160160 };
161161
162162 struct U : T {
@@ -165,7 +165,7 @@ namespace dtor_access {
165165 ~U () override ;
166166 };
167167
168- void g () { delete (T *)new U; } // expected-error {{calling a protected destructor}}
168+ void g () { delete (T *)new U; }
169169}
170170
171171namespace delete_from_new {
You can’t perform that action at this time.
0 commit comments