This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]