c++clang++apple-clangxcode26

Xcode 26 clang doesn't support sized deallocation


The clang compiler shipping with Xcode 26 does not support sized deallocation:

void* p = operator new(100);
// [...]
operator delete(p, 100); // error: no matching function for call to 'operator delete'

The previous version Xcode 16 did support this.


Solution

  • The clang shipping with Xcode 26 needs an extra compiler flag for this: -fsized-deallocation. Adding this to Other C++ flags solves the issue.