Hacker News new | ask | show | jobs
by willglynn 757 days ago
The best treatment is at:

https://blog.rust-lang.org/2024/03/30/i128-layout-update.htm...

Note also that this involves LLVM, so clang < 18 had the same u128 behavior as Rust < 1.77/1.78.

1 comments

No, clang never had this issue since they bodged it in the front-end. From the post you linked:

> Clang uses the correct alignment only because of a workaround, where the alignment is manually set to 16 bytes before handing the type to LLVM.

Maybe it took long to notice because it was assumed to be working in LLVM since clang worked?