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

--- Comment #0 from Don <> 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:
------- You are receiving this mail because: -------

Reply via email to