Strict aliasing in D

monarch_dodra monarchdodra at gmail.com
Sat Jul 27 02:03:56 PDT 2013


On Saturday, 27 July 2013 at 08:58:22 UTC, Walter Bright wrote:
> On 7/27/2013 1:08 AM, monarch_dodra wrote:
>> 1. Does strict aliasing apply to slices?
>
> I don't know what you mean.

double d;
uint* p = cast(int*)&d; //unsafe aliasing

vs

double[] d = new double[](1);
uint[] p = cast(uint[])d; //unsafe aliasing ?


More information about the Digitalmars-d mailing list