This is the mail archive of the
mailing list for the newlib project.
Re: printf/inttypes.h warning
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <newlib at sourceware dot org>
- Date: Tue, 16 Dec 2014 15:44:39 +0000
- Subject: Re: printf/inttypes.h warning
- Authentication-results: sourceware.org; auth=none
- References: <548E6F5B dot 5060703 at oarcorp dot com> <20141215151442 dot GC11968 at calimero dot vinschen dot de> <548F2405 dot 3050205 at oarcorp dot com> <20141215201320 dot GA17577 at calimero dot vinschen dot de> <548F8317 dot 2020009 at oarcorp dot com> <20141216102406 dot GH10824 at calimero dot vinschen dot de> <D3CDAAC1-36DF-49D8-AB93-191623F60C22 at oarcorp dot com> <20141216132950 dot GB21631 at calimero dot vinschen dot de>
On Tue, 16 Dec 2014, Corinna Vinschen wrote:
> > It is GCC. gcc/config/newlib-stdint.h where GCC defines the types.
> Ok, I didn't know there's newlib-specific stuff in GCC. I'm just
> not sure in how far this is newlib's fault. The usage of __INTPTR_TYPE__
> looks right to me. The gcc/config/newlib-stdint.h file seems to be
newlib-stdint.h is meant to replicate the logic used by all versions of
newlib to select these types, including versions predating the addition of
macros such as __INTPTR_TYPE__.
* The choices of these types are meant to be constant over time.
* GCC needs to know them (without reference to the newlib headers when GCC
is built) for such purposes as Fortran C bindings.
* newlib stdint.h as of 2008/9 was used as the source of truth about these
types when writing newlib-stdint.h.
* When newlib uses macros such as __INTPTR_TYPE__ it's indirectly using
GCC's newlib-stdint.h as a source of truth - but this should never change
the choice of types relative to what would be used with older GCC or
Joseph S. Myers