Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Tox

Name: Anonymous 2014-06-23 12:55

Tox, the distributed instant messaging program, just got a new GUI client that is written in PURE C WITHOUT ANY DIRTY TOOLKITS. Calls Xlib and the win32 api directly.

Pretty interesting.

https://github.com/notsecure/uTox

Name: Anonymous 2014-06-23 16:17

>>14
~0 is enough to invoke undefined behavior.
C99 supports both ones' complement and sign magnitude as well as two's complement. In a ones' complement machine, all-bits-set is a potential trap representation, as it represents the value you get when you evaluate negative zero.

You're supposed to have the equality -0 == 0. But ~0 == -0. So ~0 invokes undefined behavior. A fix would be ~0u.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List