jyknight added a comment.

In D118804#3302675 <https://reviews.llvm.org/D118804#3302675>, @rsmith wrote:

> I support this revert.

Having received enough support, I'll go ahead and commit, and then propose 
backport to llvm 14 branch.

But --

> - `malloc` always returns storage whose alignment is at least the largest 
> fundamental alignment.

As has been discussed previously in this review thread, that's not true -- and 
the in-practice-falseness of this statement was the trigger for reverting the 
change.

Not only is it not true in practice, it was clarified for C2x such that it's 
definitely not true per standard, either (while, before, it was unclear and 
could've been read either way). The current wording in C2x is: "The pointer 
returned if the allocation succeeds is suitably aligned so that it may be 
assigned to a pointer to any type of object with a fundamental alignment 
requirement and size less than or equal to the size requested.", see 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2293.htm


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118804/new/

https://reviews.llvm.org/D118804

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

Reply via email to