This is the mail archive of the mailing list for the newlib 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]

Re: Sebastian's Patches Committed

On 2013-10-25 04:30, Hans-Peter Nilsson wrote:
From: Joel Sherrill <>
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

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  :
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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