Owen Kirby osk@exegin.com writes:
Actually, that's not entirely correct. I have seen some architectures that will turn a shift into a nop when the shift width is greater than the word size.
Shifts greater than the word size can give different types of undefined behaviour. Ignoring higher bits of the shift count is also common, I think, depending on compiler and instruction set.
But in this case, I think it can't cause any real harm, because these shifts are inside an
if (authlen >= (0x01ULL << 32)) {
which should be always false if authlen (of type size_t) is 32-bits.
I have some ARM boards that I can cross compile for, so I'll take a look at cleaning up the warnings when I get some time this weekend.
I think you get the same warnings if you configure with CC='gcc -m32' CXX='g++ -m32' on a plain x86_64 gnu/linux box or similar.
Regards, /Niels