[PATCH] newlib-stdint.h: Remove 32 bit longs

Andy Ross andrew.j.ross@intel.com
Mon Aug 22 16:43:00 GMT 2016

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!)

So obvious code like I posted, which works everywhere, generates
warnings with a newlib cross compiler.  I would like to see that


More information about the Gcc-patches mailing list