[Issue 1173] New: Inline assembler: cannot use global scope operator
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 21 07:57:30 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1173
Summary: Inline assembler: cannot use global scope operator
Product: D
Version: 1.013
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: deewiant at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list