This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: cr16, lm32: error: Unable to determine type definition of intptr_t/int32_t
- From: Yaakov Selkowitz <yselkowitz at cygwin dot com>
- To: newlib at sourceware dot org
- Date: Tue, 1 Mar 2016 10:17:12 -0600
- Subject: Re: cr16, lm32: error: Unable to determine type definition of intptr_t/int32_t
- Authentication-results: sourceware.org; auth=none
- References: <56D505C9 dot 10808 at redhat dot com> <56D56F3B dot 7040801 at redhat dot com> <20160301104052 dot GA23169 at calimero dot vinschen dot de> <56D57395 dot 6050103 at redhat dot com>
On 2016-03-01 04:48, Nick Clifton wrote:
#else
/* Handle targets with known broken GCCs, otherwise give up */
# if defined (__CR16__)
# define _INTPTR_EQ_SHORT
# elif defined (__LM32__)
# define _INT32_EQ_LONG
# else
# error "Unable to determine type definition of intptr_t"
# endif
#endif
That seems fair.
Yaakov - What are the configurations of cr16 and lm32 that do not define __INTPTR_TYPE__ ?
It appears all configurations of these targets are affected.
cr16-elf default is:
#define __CHAR16_TYPE__ short unsigned int
#define __CHAR32_TYPE__ unsigned int
#define __INTMAX_TYPE__ long long int
#define __PTRDIFF_TYPE__ long int
#define __SIZEOF_DOUBLE__ 8
#define __SIZEOF_FLOAT__ 4
#define __SIZEOF_INT__ 2
#define __SIZEOF_LONG_DOUBLE__ 8
#define __SIZEOF_LONG_LONG__ 8
#define __SIZEOF_LONG__ 4
#define __SIZEOF_POINTER__ 4
#define __SIZEOF_PTRDIFF_T__ 4
#define __SIZEOF_SHORT__ 2
#define __SIZEOF_SIZE_T__ 4
#define __SIZEOF_WCHAR_T__ 2
#define __SIZEOF_WINT_T__ 2
#define __SIZE_TYPE__ long unsigned int
#define __UINTMAX_TYPE__ long long unsigned int
#define __WCHAR_TYPE__ short unsigned int
#define __WINT_TYPE__ unsigned int
cr16-elf -mint32 is similar except for:
#define __SIZEOF_INT__ 4
#define __SIZEOF_WINT_T__ 4
cr16-elf -fPIC has no affect on either mode.
lm32-elf default is as follows:
#define __CHAR16_TYPE__ short unsigned int
#define __CHAR32_TYPE__ unsigned int
#define __INTMAX_TYPE__ long long int
#define __PTRDIFF_TYPE__ int
#define __SIZEOF_DOUBLE__ 8
#define __SIZEOF_FLOAT__ 4
#define __SIZEOF_INT__ 4
#define __SIZEOF_LONG_DOUBLE__ 8
#define __SIZEOF_LONG_LONG__ 8
#define __SIZEOF_LONG__ 4
#define __SIZEOF_POINTER__ 4
#define __SIZEOF_PTRDIFF_T__ 4
#define __SIZEOF_SHORT__ 2
#define __SIZEOF_SIZE_T__ 4
#define __SIZEOF_WCHAR_T__ 4
#define __SIZEOF_WINT_T__ 4
#define __SIZE_TYPE__ unsigned int
#define __UINTMAX_TYPE__ long long unsigned int
#define __WCHAR_TYPE__ int
#define __WINT_TYPE__ unsigned int
None of the other configurations change these values.
--
Yaakov