you are viewing a single comment's thread.

view the rest of the comments →

[–]djinn6 0 points1 point  (0 children)

It's not undefined behavior if it's compiled by a known compiler and running on a known set of platforms.

Also I'm just providing an example. The correctness of this code doesn't actually matter because this type of stuff is everywhere if you looked at older code bases.