www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10211] New: CTFE: Support casts from S** to D**, if S* -> D* is supported.

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

           Summary: CTFE: Support casts from S** to D**, if S* -> D* is
                    supported.
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: clugdbug yahoo.com.au


--- Comment #0 from Don <clugdbug yahoo.com.au> 2013-05-30 00:10:09 PDT ---
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())

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 30 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10211



--- Comment #1 from github-bugzilla puremagic.com 2013-05-31 23:49:25 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/2bd6ba3a62072c3c72e5565b80a51d0ed4bc221f
Fix bug 10211: CTFE: Allow cast S**->D**, if S*->D* is OK

https://github.com/D-Programming-Language/dmd/commit/320e4bd639c11e1d09965bc09f5a9849de9f25f4
Merge pull request #2099 from donc/ctfe10211pointercasts

Fix bug 10211: CTFE: Allow cast S**->D**, if S*->D* is OK

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 31 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10211



--- Comment #2 from github-bugzilla puremagic.com 2013-09-13 10:45:57 PDT ---
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/76982cbab25a65a3a3bd61c597c51b3f24d1d709
Fix bug 10211: CTFE: Allow cast S**->D**, if S*->D* is OK

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 13 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10211


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


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