[Bug 2038] C99 integer type mismatch in GCC and Newlib

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Sat Mar 10 06:59:49 UTC 2012


https://www.rtems.org/bugzilla/show_bug.cgi?id=2038

--- Comment #1 from Ralf Corsepius <ralf.corsepius at rtems.org> 2012-03-10 00:59:49 CST ---
I think I see what's going on.

These errors all seem to refer to intptr_t and uintptr_t.

Previously, gcc did not provide internal typedefs for these types, so we
resorted to basing [u]intptr_t on ptrdiff_t in stdint.h. 

This now is causing gcc to complain, because its internal typedefs do not match
with what we use in newlib's stdint.h (The fact these error messages appear
twice is a mild defect in GCC, which has been present for several years).

I see possible approaches to resolve this.

1. Ignore this for now.
This should be feasible, because these testsuite errors should not cause any
real errors in application code (They trigger warnings).

2. Let newlib's stdint use GCC's typedefs.
Implementing this should be straight forward, but is a bit tedious.

3. Abandon newlib's stdint.h and use GCC's stdint.h.
To me is the ultimate solution we should strive for, I have been experimenting
with for quite a while (You can find traces of these experiments in my gcc rpm
specs).

Implementing this in GCC is trivial, but implementing this in newlib is a bit
problematic.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list