[Issue 6800] New: [CTFE] dangerous pointer casts should be rejected
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 10 01:18:46 PDT 2011
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: nobody at puremagic.com
ReportedBy: clugdbug at yahoo.com.au
--- Comment #0 from Don <clugdbug at 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: -------
More information about the Digitalmars-d-bugs
mailing list