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

           Summary: [CTFE] dangerous pointer casts should be rejected
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: clugd...@yahoo.com.au


--- Comment #0 from Don <clugd...@yahoo.com.au> 2011-10-10 01:17:58 PDT ---
Some dangerous casts are currently accepted, but shouldn't be:

static assert({
    int *x = (new int[2]).ptr;
    double* ary= cast(double *)x;
    return true;
}());

This shouldn't compile. This is vaguely related to bug 6792; it's a type
painting issue.

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

Reply via email to