I don't understand. This code is endianess safe no matter if compiler optimizes it into 32 bit check or not.
Sorry, I should have put myself more clear here. What I have meant is an endianness issue in general. We had discussions on AW.net as well as in other places where ppl were trying to argue that endianness is not an issue because one could just swap every fetch of data on cpu with the "other" endianness and that way solve endianness issues on an operating system.
What I was trying to show here is that this is not the case due to compiler optimisations discarding the size of underlying data types.
Sorry for previous explanation which was too short to clarify myself :)