Signing error Winrt
Monkey Forums/Monkey Bug Reports/Signing error Winrt
| ||
I get this error with winrt: error C4146: unary minus operator applied to unsigned type, result still unsigned. Trans CPP Code: t_lX8=t_lX&-2147483648; Needs to be: t_lX8=t_lX&-(int)2147483648; |
| ||
Sample code? |
| ||
Hi, this will do it:Function Main:Int() Local blah:Int = -2147483648 Return 0 End |
| ||
Ok, this can be 'fixed' by disabling 'security checks' in winrt c++ compiler options - but by 'fixed', I mean it'll generate a warning not an error. I'll do this for the next release so you can at least use an 'int min' value, but there are still a few rough edges in Monkey to do with int constants that I need to look into longer term. I'm not even sure if the above error is strictly correct in this case, as -2147483648 is a perfectly valid 32 bit signed int value - it's the smallest possible int (ie: $80000000). On the other hand, 2147483648 on it's own can't be stored in a signed int, so negating it is a no no. Guess you can look at it either way... |
| ||
Thanks Mark, getting just a warning will be much better :) |