https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68482
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- The extra cast so 32-bit unsigned and 64-bit pointers can interact confuses the compiler. Trunk (gcc-6) seems to work fine though, can you confirm?