https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115963
Bug ID: 115963
Summary: P3144R2 is not yet completely implemented
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: de34 at live dot cn
Target Milestone: ---
It's currently claimed that P3144R2 is implemented in GCC 15 (see also
PR115747). But the following program is still accepted by GCC
(https://godbolt.org/z/vxq6YbnrM).
```
#include <cstdint>
int main()
{
struct Incomplete;
delete static_cast<Incomplete*>(nullptr);
delete reinterpret_cast<Incomplete*>(std::uintptr_t{});
}
```
Currently, it seems that GCC doesn't reject deleting a pointer to an incomplete
class type when it's known that the pointer is null.