www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21634] New: std.bitmanip: bitfields may generate invalid

https://issues.dlang.org/show_bug.cgi?id=21634

          Issue ID: 21634
           Summary: std.bitmanip: bitfields may generate invalid variable
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: bugzilla bernis-buecher.de

unittest
{
    struct A
    {
        mixin(bitfields!(
                         int, "", 1,
                         int, "LINE", 3,
                         int, "", 1,
                         int, "", 3));
    }
}

Should compile, but produces a variable called "__LINE__".

--
Feb 13