Thread overview
[Issue 947] New: offsetof and alignof for an enum field of a struct fail to compile
Feb 11, 2007
d-bugmail
Mar 29, 2007
d-bugmail
Sep 10, 2009
Don
February 11, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=947

           Summary: offsetof and alignof for an enum field of a struct fail
                    to compile
           Product: D
           Version: 1.005
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: guido@grumpy-cat.com


// 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;
}


-- 

March 29, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=947





------- Comment #1 from thomas-dloop@kuehne.cn  2007-03-29 14:30 -------
Added to DStress as http://dstress.kuehne.cn/compile/o/offsetof_81_A.d


-- 

September 10, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=947


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug@yahoo.com.au
         Resolution|                            |FIXED


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2009-09-10 05:17:59 PDT ---
This was fixed either in 1.039 or 1.041. Works in D2, as well.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------