On Mon, Aug 24, 2015 at 09:33:19PM +0200, Josef Wolf wrote: > > Right. Also you should use -fno-strict-aliasing since you play non-standard > > pointer games. > > Could you elaborate more verbosely on this, please? I don't see where aliasing > problems could be hidden in the outlined code fragments. You have many unnecessary pointer casts, which is a red flag; if there are problems in such code and with -fno-strict-aliasing they disappear, you have probably found the problem. I don't see an aliasing problem either, but I also do not see there is no such problem; for example, the pointer subtractions probably work for you, but they are non-standard; much cleaner would be e.g. something with uintptr_t. Segher