[Issue 16563] [REG HEAD] Wrong struct size/alignment in local struct

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Sep 28 18:30:23 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16563

--- Comment #2 from uplink.coder at googlemail.com ---
The hacky fix for this looks like this:

--- a/src/dstruct.d
+++ b/src/dstruct.d
@@ -299,7 +299,8 @@ extern (C++) class StructDeclaration : AggregateDeclaration
         if (semanticRun == PASSinit)
         {
             protection = sc.protection;
-
+            if (sc && sc.aligndecl && !sc.aligndecl._scope &&
sc.parent._scope)
+                sc.aligndecl._scope = sc.parent._scope;
             alignment = sc.alignment();

--


More information about the Digitalmars-d-bugs mailing list