avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Old bug - ordering of 16 bit assignments


From: E. Weddington
Subject: Re: [avr-gcc-list] Old bug - ordering of 16 bit assignments
Date: Mon, 28 Feb 2005 10:57:27 -0700
User-agent: Mozilla Thunderbird 0.7.3 (Windows/20040803)

David Gay wrote:

On Mon, 28 Feb 2005 08:29:18 -0500, Bob Paddock
<address@hidden> wrote:
On Sun, 27 Feb 2005 08:52:35 -0500, Andy Hutchinson
<address@hidden> wrote:

I would suggest we live with this one.
Only if it documented someplace as known to be broken.

I would point out that, as far as the C language is concerned, this is
not a bug: there is no guarantee as to which order the bytes of a
multi-byte entity are written in. It's arguably a "quality of
implementation" issue (i.e., "good" compilers would guarantee such an
order), but as this thread points out there might be disagreement on
that...

It would make more sense to me to:
- document this clearly
- provide macros/inline functions in avr-libc for access to the AVRs
word-based I/O registers (ok, I haven't checked recently, those are
quite likely there already).

AFAIK, they are *not* there. Currently it's up to the user to write them. Luckily, the datasheets explain the correct access order.

Eric




reply via email to

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