This is the mail archive of the newlib@sourceware.org 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] |
GCC doesn't apply a size-based logic to define size_t, but applies hard-coded predefined types for size_t, likely based on historic per-target conventions.
I.e. any type-size based logic will sometimes fail:
E.g. for targets with sizeof(size_t) == sizeof(int) == sizeof(long). on some targets GCC uses "typedef unsigned int size_t" and on other targets GCC uses "typedef unsigned long size_t".
sparc-rtems*/sparc-*elf: #define __SIZEOF_INT__ 4 #define __SIZEOF_LONG__ 4 #define __SIZEOF_SIZE_T__ 4 #define __SIZE_TYPE__ unsigned int
i386-rtems*/i386-*elf: #define __SIZEOF_INT__ 4 #define __SIZEOF_LONG__ 4 #define __SIZEOF_SIZE_T__ 4 #define __SIZE_TYPE__ long unsigned int
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |