[Issue 12147] New: Any bitfield with member named "version" will fail to compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 12 17:00:26 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12147

           Summary: Any bitfield with member named "version" will fail to
                    compile
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bdsatish at yahoo.in


--- Comment #0 from bdsatish at yahoo.in 2014-02-12 17:00:23 PST ---
If the member of any bitfield is named "version", then the compilation fails.

Example:


    import std.bitmanip;


    struct S {
       mixin(bitfields!(uint, "version", 8));
    }


Compilation error:
/d944/f401.d(5): Error: no identifier for declarator uint 
/d944/f401.d(5): Error: semicolon expected, not 'version'
/d944/f401.d(5): Error: identifier or integer expected, not )
/d944/f401.d(5): Error: found 'pure' when expecting ')'
/d944/f401.d(5): Error: Declaration expected, not 'return'
/d944/f401.d(6): Error: no identifier for declarator void
/d944/f401.d(6): Error: semicolon expected, not 'version'

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


More information about the Digitalmars-d-bugs mailing list