[PATCH] D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 23 16:43:22 PDT 2017
ahatanak added a comment.
The motivation for this change was to silence linker errors I saw when compiling and linking programs in which operator new was called to allocate over-aligned types (similar to the code in cxx1z-aligned-allocation.cpp). Linkage failed because clang would emit the calls to the operator with alignment which were not implemented in the library.
I see now that it is probably not a good idea to disable this in the compiler for the two reasons you brought up.
Is there any cases where we can turn the linker error into a compile time error?
https://reviews.llvm.org/D34574
More information about the cfe-commits
mailing list