On Tue, 30 Jul 2019, Martin Liška wrote:

Ah, that's bad, both of them need a care:

Yes, that makes more sense to me, thanks.

I tried to experiment to understand, but it is complicated because including 
<new> disables the optimization:

#include <new>
void fn1() {
    char*p=new char;
    delete p;
}

This ICEs with -O -std=c++17:

int a = 64;
std::align_val_t b{64};
void fn1() {
  void *s = operator new(a,b);
  operator delete(s,8+*(unsigned long*)s,b);
}



I can't see it on current master. Can you?

Yes. I just did a clean build to make sure.

--
Marc Glisse

Reply via email to