avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] inttypes.h cleanup for -mint8


From: E. Weddington
Subject: Re: [avr-libc-dev] inttypes.h cleanup for -mint8
Date: Tue, 12 Nov 2002 09:14:29 -0700

On 12 Nov 2002 at 10:05, Joerg Wunsch wrote:

> As Theodore A. Roth wrote:
> 
> > So to summarize:
> > 
> > Normal avr-gcc:
> > 
> >   char      -> 8 bit
> >   int       -> 16 bit
>     short     -> 16 bit
> >   long      -> 32 bit
> >   long long -> 64 bit
> > 
> > -mint8 mode:
> > 
> >   int <-> char -> 8 bit
>     short        -> 16 bit
> >   long         -> 16 bit
> >   long long    -> 64 bit
> 
> > Hmm, seems to me that long long when using -mint8 would be better
> > defined as 32 bits and forego the the 64 bit value. I have seen
> > systems lacking a 64 bit type, but never lacking a 32 bit type.
> 
> Yep, i also thought so.  Instead of dropping -mint8 completely from
> avr-gcc, my vote also goes for making long long a 32-bit type then.
> 

My ideal:

Normal avr-gcc:
 
  char      -> 8 bit
  int       -> 16 bit
  short     -> 16 bit
  long      -> 32 bit
  long long -> 64 bit

-mint8 mode:
  char          -> 8 bit
  int            -> 8 bit
  short        -> 16 bit
  long         -> 32 bit
  long long  -> 64 bit

That way promotion to int will be more optimal on micros.

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]