Bug 947 – offsetof and alignof for an enum field of a struct fail to compile

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-02-11T01:44:00Z
Last change time
2014-02-16T15:21:42Z
Keywords
rejects-valid
Assigned to
nobody
Creator
guido

Comments

Comment #0 by guido — 2007-02-11T01:44:15Z
// dbug.d:15: Error: no property 'offsetof' for type 'int' enum magic { xyzzy, plugh } struct plover { int a; magic b; int c; } void main() { auto y2 = plover.b.offsetof; }
Comment #1 by thomas-dloop — 2007-03-29T14:30:32Z
Comment #2 by clugdbug — 2009-09-10T05:17:59Z
This was fixed either in 1.039 or 1.041. Works in D2, as well.