Spec on casting to integer with smaller range than value

kinke noone at nowhere.com
Sat Mar 28 16:06:39 UTC 2020


On Saturday, 28 March 2020 at 15:47:04 UTC, Dennis wrote:
> On Saturday, 28 March 2020 at 15:33:35 UTC, kinke wrote:
>> that should probably be explicitly mentioned as undefined 
>> behavior, to account for the observed LLVM/gcc behavior.
>
> Which would make `cast(int) someFloat` not allowed in @safe 
> code.

@safe is about memory corruption, not about disallowing any 
undefined behavior.



More information about the Digitalmars-d mailing list