[Issue 1252] New: Inline assembler: cannot use properties of types

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 31 07:36:12 PDT 2007


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 at digitalmars.com
        ReportedBy: deewiant at 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.


-- 



More information about the Digitalmars-d-bugs mailing list