Summary: Inline Assembly: Getting offset of a label
           Product: D
           Version: 1.037
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]

Dear bugfixers of D,

D's offsetof does not seem to work in inline assembly. I'm afraid, this hinders
the use of D as a system programming language and I'd really appreciate this
implementation in version 1, too. Let's move on an example:

import std.stdio;

void main()
      call L1;
      L1: pop EBP;
      sub EBP, offsetof L1;
Line 9: undefined identifier 'L1'

I have read your other bug reports about offsetof and on the first 2 asm lines
I'm using your 'workaround' way. But the 3rd line of asm code is very important
to implement PIC (Position Independent Code). I'm sure you understand it's
importance and looking forward to get the bug fixed as soon as possible. 

Thank you very much. Regards, Robert Forrest


Reply via email to