[Issue 8088] New: Inline assembler: Indexing struct fields not possible

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 11 20:35:49 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8088

           Summary: Inline assembler: Indexing struct fields not possible
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2012-05-12 07:37:14 MSD ---
Example from http://dlang.org/iasm.html:
---
struct Foo { int a,b,c; }
int bar(Foo *f) {
    asm {
        mov EBX, f;
        mov EAX, Foo.b[EBX];
    }
}
---
main.d(5): Error: variable b cannot be read at compile time

Also see Issue 5302

Workaround: add .offsetof

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


More information about the Digitalmars-d-bugs mailing list