http://d.puremagic.com/issues/show_bug.cgi?id=4046

           Summary: [CTFE] std.intrinsic
           Product: D
           Version: future
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2010-04-02 14:25:39 PDT ---
import std.intrinsic: bt;
int foo() {
    uint x = uint.max;
    return bt(&x, 5);
}
int _ = foo();
void main() {}


dmd 2.042 gives:

test.d(4): Error: cannot evaluate bt((& x),5u) at compile time
test.d(6): Error: cannot evaluate foo() at compile time
test.d(6): Error: cannot evaluate foo() at compile time


In CTFE the the compiler can replace the intrinsics with little functions with
the same semantics.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to