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: cr16, lm32: error: Unable to determine type definition of intptr_t/int32_t

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.


Attachment: signature.asc
Description: PGP signature

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