www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1173] New: Inline assembler: cannot use global scope operator

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: deewiant 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.


-- 
Apr 21 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1173


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All




------- Comment #1 from thomas-dloop kuehne.cn  2007-04-23 12:55 -------
Added to DStress as
http://dstress.kuehne.cn/run/a/asm_03_A.d
http://dstress.kuehne.cn/run/a/asm_03_B.d
http://dstress.kuehne.cn/run/a/asm_03_C.d
http://dstress.kuehne.cn/run/a/asm_03_D.d


-- 
Apr 23 2007