cr16, lm32: error: Unable to determine type definition of intptr_t/int32_t

Corinna Vinschen
Tue Mar 1 10:41:00 GMT 2016

On Mar  1 10:30, Nick Clifton wrote:
> Hi Yaakov,
> > The changes to int32_t/intptr_t detection in <sys/_intsup.h> do not work 
> > on cr16-elf or lm32-elf targets, neither of which define (in some 
> > configurations) __INTPTR_TYPE__ or __INT32_TYPE__.
> This sounds like a GCC bug - those macros really should be defined.
> > How are these supposed to be handled?
> By adding a #error line maybe ?

Assuming broken GCCs, shouldn't we handle them gracefully?  In a case
like this we could add target-dependent definitions before bailing out
with an error, e.g.

/* 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

Note that I don't know if the above is right, it's just to illustrate
the point.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <>

More information about the Newlib mailing list