Bug 9180 – can't compile example code on dlang.org
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-12-18T13:46:00Z
Last change time
2013-01-02T01:42:21Z
Keywords
pull
Assigned to
nobody
Creator
govellius
Comments
Comment #0 by govellius — 2012-12-18T13:46:00Z
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" ?
Comment #1 by andrej.mitrovich — 2012-12-27T09:15:14Z