Andrew Pinski wrote: > Why do you think the above code does not have a bug in it? int32_t > is long and changing it now is changing the ABI (especially for > C++).
I don't follow. There's no change to the ABI, the generated code is identical in all cases. Can you explain what you mean? The problem here is that on 32 bit platforms (and *only* on 32 bit platforms), gcc picks "long" for a 32 bit type in a way that confuses newlib into using it for int32_t in a way that is technically legal, but incompatible with the way the rest of the world (including newlib itself when building with other compilers on the same platform!) works. So obvious code like I posted, which works everywhere, generates warnings with a newlib cross compiler. I would like to see that fixed. Andy