Bug 1173 – Inline assembler: cannot use global scope operator
Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2007-04-21T09:57:29Z
Last change time
2019-07-13T11:07:45Z
Keywords
iasm, rejects-valid
Assigned to
No Owner
Creator
Matti Niemenmaa
Comments
Comment #0 by matti.niemenmaa+dbugzilla — 2007-04-21T09:57:29Z
int x;
int main() {
asm {
mov EAX, .x;
}
}
The above code fails with the error "nops expected".
Ways to work around this: removing the leading period from the x (doesn't work if there's a local x, of course), creating an alias to x and using that instead, or using a module declaration and referring to x by way of the module name.