Seems we already handle delete expressions the way the DR clarifies,
so this patch just adds a testcase which verifies that.
2024-09-25 Jakub Jelinek <jakub@redhat.com>
* g++.dg/DRs/dr2728.C: New test.
--- /dev/null
+// DR 2728 - Evaluation of conversions in a delete-expression
+// { dg-do run }
+
+struct S {
+ S (int *x) : p (x) {}
+ operator int * () const { ++s; return p; }
+ int *p;
+ static int s;
+};
+int S::s;
+
+int
+main ()
+{
+ int *a = new int;
+ S s (a);
+ delete s;
+ if (S::s != 1)
+ __builtin_abort ();
+}