[Top][All Lists]

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

Re: [avr-gcc-list] volatile...

From: Graham Davies
Subject: Re: [avr-gcc-list] volatile...
Date: Fri, 15 Dec 2006 07:27:45 -0500

"David Brown" wrote:
> You are missing a number of points ...

Well, I think we're getting close to complete coverage now!

On the subject of volatile isn't enough and straying further from AVR,
remember that if your machine has a data cache you need to figure out how to
not have the cache between you and a hardware register.  This varies by CPU
and there is nothing in the language to help you with this.

On the subject of beginners, I once had to work with a group of
"professionals" who between them hadn't figured out what any of the storage
qualifiers meant and sprinkled the code with static to tell the compiler not
to cache the variable.  There wasn't a const or volatile to be found.  It
only worked because they hadn't figured out how to turn the cache on in the
first place and only built "debug" code (no optimizations).


reply via email to

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