[Issue 4046] New: [CTFE] std.intrinsic
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 2 14:25:41 PDT 2010
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: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at 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: -------
More information about the Digitalmars-d-bugs
mailing list