[Issue 1055] New: union forward reference "overlapping initialization" error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 11 23:26:47 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1055

           Summary: union forward reference "overlapping initialization"
                    error
           Product: D
           Version: 1.009
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: wbaxter at gmail.com


New with DMD 1.009.
This gives the error
: struct overlapbug.Z overlapping initialization for struct Z.bar

struct Z {
    int bar=1;
    union { FooT foo; }
}
struct FooT{ size_t offset=0;}


But it works if you move "int bar=1" after the union.
And it also works if you move the declaration of FooT before Z.


Also this is one of those error messages that lacks an "Error" prefix in the
message.


-- 



More information about the Digitalmars-d-bugs mailing list