11 Nov
2015
11 Nov
'15
4:59 a.m.
https://bugs.winehq.org/show_bug.cgi?id=38337 --- Comment #10 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Dmitry Timoshkov from comment #9)
But next attempt make crazy!
~~~ int main() { unsigned short x = 3, y = 5, z; z = x - y; printf(" results: %d, abs=%d\n", z, abs(z)); } ~~~~~
results: 65534, abs=65534
If there is unsigned short then the result is bad!
The result is perfectly correct. You need to add explicit casts to (signed int)z and abs((signed int)z) if you want to unbreak it.
Or rather cast to 'signed short'. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.