rsmith added a comment.

In https://reviews.llvm.org/D45015#1109049, @ahatanak wrote:

> - Currently clang errors out when aligned operator new is selected but the 
> OS's version is too old to support it. What's the reason we want to change 
> this now to be a warning rather than an error?


I think it's fine to leave it as a `DefaultError` warning. I think it'd also be 
fine to change it to simply be an error (rather than an 
error-with-warning-flag) and remove the error recovery, and that actually seems 
a bit better: then our behavior under -faligned-alloc-unavailable would be 
equivalent to treating the implicit aligned forms of operator new/delete as if 
they had an availability attribute on them by default, which I think seems very 
reasonable.

> - So clang no longer needs to define macro 
> `__ALIGNED_ALLOCATION_UNAVAILABLE__` and libc++ will use `__cpp_aligned_new` 
> (I think you meant `__cpp_aligned_new`, not `__cpp_aligned_allocation`?) to 
> determine whether aligned allocation functions should be defined or made 
> available in the header?

Yes, that's the idea. `__cpp_aligned_new` exists to allow code to conditionally 
use aligned new if it's available, and we should do our best to honor that.


Repository:
  rC Clang

https://reviews.llvm.org/D45015



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to