Sebastian's Patches Committed
Sebastian Huber
sebastian.huber@embedded-brains.de
Fri Oct 25 07:01:00 GMT 2013
On 2013-10-25 04:30, Hans-Peter Nilsson wrote:
>> From: Joel Sherrill <joel.sherrill@oarcorp.com>
>> Date: Tue, 15 Oct 2013 19:41:34 +0200
>
>> I just committed Sebastian's patches. If there are issues,
>> just speak up. :)
>
> This seems wrong. Including e.g. stdlib.h shouldn't pull in
> stdint.h. There's likely standards language forbidding this but
> I don't have it right here. Glibc used to have such issues.
> Such bleed is not helpful to users; they should need to include
> the right headers, not just a random header when needing
> e.g. uint32_t.
Yes, libc from FreeBSD uses also a clean type system that doesn't have this
problem. The basic issue for Newlib is that it can use <stdint.h> provided by
GCC. So from my point of view we have only two options
1. Use <stdint.h> from GCC and do this consistently, or
2. do not use <stdint.h> from GCC and define the type system on our own.
Option 2. has the problem that GCC checks that its internal types match the one
in <stdint.h>. GCC has no general strategy to define its internal types and
they are target dependent (e.g. int vs. long for uint32_t).
>
> Right, it affects only margin cases, but those exist. See for
> example gcc/testsuite/gcc.dg/20050922-1.c and -2.c on the 4.7
> and 4.8 branch (they might be "fixed" soon to not define
> uint32_t).
>
> brgds, H-P
>
Ok, this should be fixed in the GCC test suite.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the Newlib
mailing list