www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1252] New: Inline assembler: cannot use properties of types

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1252

           Summary: Inline assembler: cannot use properties of types
           Product: D
           Version: 1.014
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: deewiant gmail.com


Probably related to Bug 1173.

void main() {
        int x;
        asm {
                mov x, x.max;
        }
}

The above code compiles. However, if you replace "x.max" with "int.max", DMD
complains about "ptr expected". Replace it with "typeof(x).max" or add brackets
around the expression and DMD complains about "nops expected".

This can be worked around by using a temporary or constant.


-- 
May 31 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1252





------- Comment #1 from thomas-dloop kuehne.cn  2007-08-25 16:41 -------
Added to DStress as
http://dstress.kuehne.cn/run/a/asm_05_A.d
http://dstress.kuehne.cn/run/a/asm_05_B.d


-- 
Aug 25 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1252


matti.niemenmaa+dbugzilla iki.fi changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johnkirollos yahoo.com




------- Comment #2 from matti.niemenmaa+dbugzilla iki.fi  2007-10-26 13:10
-------
*** Bug 1614 has been marked as a duplicate of this bug. ***


-- 
Oct 26 2007