www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 947] New: offsetof and alignof for an enum field of a struct fail to compile

reply d-bugmail puremagic.com writes:
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;
}


-- 
Feb 10 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=947






Added to DStress as
http://dstress.kuehne.cn/compile/o/offsetof_81_A.d


-- 
Mar 29 2007
prev sibling parent d-bugmail puremagic.com writes:
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



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: -------
Sep 10 2009