[Issue 4213] New: Strange behaviour with static void[] arrays
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 20 12:14:01 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4213
Summary: Strange behaviour with static void[] arrays
Product: D
Version: 1.057
Platform: Other
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: nfxjfg at gmail.com
--- Comment #0 from nfxjfg at gmail.com 2010-05-20 12:13:59 PDT ---
This code always worked:
struct X {
union {
void[] a;
void[9] b;
}
}
However, if you remove the union (so that a, b are direct struct members), it
stops working and outputs "Error: integral constant must be scalar type, not
void" (without line number information!). It also stops compiling if you remove
the "a" member.
It also generates a wrong .sizeof for the struct (12 instead of 9*4). Not sure
what exactly is going on.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list