www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19886] New: Bitfields template instantiation introduces

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

          Issue ID: 19886
           Summary: Bitfields template instantiation introduces
                    unnecessary GOT symbol
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: alexandru.cmilitaru gmail.com

Bitfields template instantiation introduces unnecessary _GLOBAL_OFFSET_TABLE_
symbol. 

Because of this symbol, it is not possible to use D code inside the Linux
kernel. 

import std.bitmanip;

struct MyStruct
{
    mixin(bitfields!(
        uint, "x", 2,
        uint, "", 6));

}

https://gist.github.com/alexandrumc/ce2363b4f344289e7c8386fa6c3d614d

--
May 20 2019