Quantcast
Channel: Questions in topic: "xcode"
Viewing all articles
Browse latest Browse all 1047

hide your children, there's a float-to-ushort casting bug in the xcode 7.3.1 compiler

$
0
0
i'm super excited about this. i think it's a compiler bug. check out this C# code: float val = -3.67; // this value is not special, it's merely negative. ushort v1 = (ushort)val; ushort v2 = (ushort)(short)val; short t3 = ( short)val; ushort v3 = (ushort)t3; when compiled with xcode 7.3.1 the result when running on certain iOS devices is that v2 and v3 will be the expected value, 65533, but v1 will be 0. have tested iPad3 and a handful of iPad Mini's & iPhone 5, and they all have the bug, whereas none of the iPhone 6's we've tested repro it. also, if xcode 7.2.x is used to compile the project, the bug does not repro on any platform.

Viewing all articles
Browse latest Browse all 1047

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>