[Issue 9180] New: can't compile example code on dlang.org

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 18 13:46:01 PST 2012


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

           Summary: can't compile example code on dlang.org
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: govellius at gmail.com


--- Comment #0 from Shahid <govellius at gmail.com> 2012-12-18 13:46:00 PST ---
http://dlang.org/iasm.html

__Struct/Union/Class Member Offsets__

---
struct Foo { int a,b,c; }
int bar(Foo *f) {
  asm {
    mov EBX,f          ;
    mov EAX,Foo.b[EBX] ;
  }
}
---
test.d(5): Error: variable b cannot be read at compile time

Is DMD broken here or should we change the doc/spec to "Foo.b.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