[Issue 16508] Alignment of class members is not respected. Affects new, scoped and classInstanceAlignment.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Dec 17 10:08:44 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=16508
Max Samukha <maxsamukha at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |maxsamukha at gmail.com
--- Comment #2 from Max Samukha <maxsamukha at gmail.com> ---
std.traits.classInstanceAlignment is broken because it uses "alignof" to
calculate the maximum alignment of the class fields, and "alignof" on
class/struct fields is broken because it returns the alignment of field types
instead of the alignment of fields. __traits(classInstanceSize) is broken
because it returns a useless value that doesn't account for the trailing
padding required for proper alignment of object arrays. GC allocations are also
broken as they return misaligned class objects.
--
More information about the Digitalmars-d-bugs
mailing list