The UndefinedBehaviorSanitizer found a couple of issues where the value of non uint32_t type was implicitly typed to int and then the top bit would be shifted. It's probably harmless if size of int == 4, but I am afraid that it might be broken completely on platforms where sizeof(int) < 4.