Re: Trying to use gdb on OS X
- Posted by mattlewis (admin) Jun 10, 2013
- 3190 views
jaygade said...
I might be overthinking this a bit. I need to write this out to wrap my head around it:
1. double contains a positive value in the integer range (0x00000000 - 0xFFFFFFFF). Conversion to unsigned long should be converted correctly. Conversion to signed long should fail if the double is greater than 0x7FFFFFFF.
The basic problem is that the behavior is undefined from the perspective of the C specs, so it's very possible that the version of gcc on OSX started doing something different, pre-empting the normal x86 behavior.
You might want to look into the function we added for these casts for ARM in the default branch. I don't know if that's a better solution than using a 64-bit integer or not.
Matt