[Issue 16508] Alignment of class members is not respected. Affects new, scoped and classInstanceAlignment.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 8 17:56:43 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=16508
--- Comment #7 from kinke <kinke at gmx.net> ---
(In reply to Max Samukha from comment #6)
> (I assume you meant align(classInstanceAlignment!C), which currently
> produces wrong results due to this bug)
Yeah sorry, of course. We'll probably need a __traits(classInstanceAlignment) I
guess, as `align(64) class C { int x; }` won't be inferrable by looking at the
field alignments.
> I'm sorry to disagree.
No problem there. But it's the size the compiler uses (for the init symbol, the
TypeInfo.initializer() etc.), not some library bug, and it's working.
--
More information about the Digitalmars-d-bugs
mailing list