Language features and reinterpret casts

Don nospam at nospam.com
Mon Sep 20 19:08:32 PDT 2010


BCS wrote:
> Hello bearophile,
> 
>> Jesse Phillips:
>>
>>> Why not, define the behavior and leave it.
>>>
>> This was the original purpose of my thread, but Walter has explained
>> me that this is not possible for the unions:
>>
> 
> I don't see how those apply to unions.
> 

It's going to be implementation defined behaviour (will depend on 
endianness) but not undefined behaviour.
BTW std.math heavily relies on reinterpret casting float->int.


More information about the Digitalmars-d mailing list