Bug 10211 – CTFE: Support casts from S** to D**, if S* -> D* is supported.
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-05-30T00:10:00Z
Last change time
2015-06-09T05:12:02Z
Assigned to
nobody
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2013-05-30T00:10:09Z
int bug10211()
{
int m = 7;
int *x = &m;
int **y = &x;
assert(**y == 7);
uint *p = cast(uint *)x; // OK
uint **q = cast(uint **)y; // Rejected
return 1;
}
static assert(bug10211());
--
bug.d(8): Error: reinterpreting cast from int** to uint** is not supported in CTFE
bug.d(12): called from here: bug10211()
bug.d(12): while evaluating: static assert(bug10211())
Comment #1 by github-bugzilla — 2013-05-31T23:49:25Z