After r16-332 these tests started failing. constexpr-89285.C should have
always given this error, and the new nonlit19.C needs to remove the
destructor body to prevent -fimplicit-constexpr from making the testcase
well-formed.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1y/constexpr-89285.C: Always diagnose reinterpret_cast.
* g++.dg/cpp23/constexpr-nonlit19.C: Remove ~A body.
int *c = &x->a;
while (*c)
c = reinterpret_cast<int *>((reinterpret_cast<char *>(c) + *c));
- *c = reinterpret_cast<char *>(this) - reinterpret_cast<char *>(c); // { dg-error "reinterpret_cast" "" { target c++20_down } }
+ *c = reinterpret_cast<char *>(this) - reinterpret_cast<char *>(c); // { dg-error "reinterpret_cast" }
}
};
struct C : A { // { dg-error "" "" { target c++14_down } }
// { dg-do compile { target c++23 } }
-struct A { ~A() { } };
+struct A { ~A(); };
struct B {
constexpr B() {