[Bug target/68456] UINT32_TYPE is long unsigned for 32bit targets

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Fri Nov 20 22:14:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68456

--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Fri, 20 Nov 2015, dmitry.polukhin at gmail dot com wrote:

> What is the advantage of using 'long' instead of 'int' for uint32_t on a
> platform where both types can be used (i.e. actually they have the same size)?

The types used in GCC are intended to be consistent with what the libc's 
own headers do (lots of problems will arise if they aren't).  Newlib's 
headers, as of when this support was added to GCC, used long in that case, 
a use introduced by <https://sourceware.org/ml/newlib/2005/msg00824.html>, 
apparently because it was convenient for the newlib implementation at that 
time.


More information about the Gcc-bugs mailing list