[Top][All Lists]

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

Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs areincorrect

From: Weddington, Eric
Subject: Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs areincorrect
Date: Wed, 11 Jan 2012 19:06:41 -0700

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Georg-Johann Lay
> Sent: Wednesday, January 11, 2012 11:23 AM
> To: Joerg Wunsch
> Cc: address@hidden
> Subject: Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs
> areincorrect
> Joerg Wunsch schrieb:
> > As Georg-Johann Lay wrote:
> >
> >>As fas as I know the only reason why avr-libc used mode attribute is
> >>factor out impact of -mint8, ...
> >
> >
> > No, our previous definitions were -mint8 clean, AFAICT.  It just
> > looked more elegant to use GCC's mode attributes to ensure certain
> > widths, so when someone was proposing that change, we accepted it.
> If avr-libc does not want to factor out -mint8 then it is even
> just
> typedef signed long int32_t;
> There's absolutely no rationale for using mode attribute as
> is defined by the implementation and won't change at will.

Ok, so there are historical reasons why we (avr-libc maintainers) did it
that way. Today, it may be different.

Personally, I would like to see -mint8 go away. As we keep stating: it
breaks the standard. That's a good enough reason for me. I'd rather not
keep around non-standard stuff, which breaks avr-libc anyway. AIUI,
though, there are people who want the best code density, which *may*
require -mint8. But there aren't *that* many people who use the switch.
I think that as soon as we have enough confidence in the code generation
of the AVR backend, then we should seriously consider getting rid of it.

I think it does make certain sense to change the typedefs of our
stdint.h to make them straightforward C like Johann shows above. GCC
modes are very much specific to GCC. Yes, the backend defines the sizes
of those types, and the backend doesn't change on a whim. We don't have
enough backend developers to be worried about "whimsy". ;-)

Would someone be willing to work up a patch?

Johann, you've been working on the GCC backend *a lot*. You probably
have the best sense of where it stands. When do you think we can remove
the -mint8 switch? Do you think that the backend codegen is good enough
now to warrant this? 

reply via email to

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