http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46261

--- Comment #21 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> 2011-07-04 10:58:14 UTC ---
On Sat, 2 Jul 2011, gjl at gcc dot gnu.org wrote:

> > Indeed, I simply made all bare-metal targets use newlib-stdint.h as a 
> > default, but since AVR has its own libc it seems more appropriate to put 
> > the defines in avr-stdint.h or avr.h and not use newlib-stdint.h.  (And 
> > the point of having separate headers such as newlib-stdint.h is that there 
> > may not otherwise be a header shared between all relevant targets.  If all 
> > AVR targets use avr-libc, putting the defines in avr.h makes sense, but if 
> > avr-rtems is using newlib like other RTEMS targets then you probably want 
> > a separate header only for AVR targets using avr-libc.)
> 
> The extra header is not needed because of avr-libc; there is nothing special
> about avr-libc and it conforms to the standard (except when you explicitely

Headers such as newlib-stdint.h tell GCC about the details of choices made 
by the libc implementation where more than one choice would conform to the 
standard.  Thus, if avr-libc has made any choices relating to stdint.h 
different from the choices made by newlib, a separate header may be 
needed for that reason alone.  (All the gcc.dg/c99-stdint-*.c tests should 
pass; if any fail, that suggests either a header bug or a requirement for 
GCC to change how these types are configured in GCC for AVR.)

Reply via email to