Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Volatile modifier

2012-04-17 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, "bayramdavies" <Yahoo37849@...> wrote:
> > Otherwise most global variables are by
> > nature changeable at any time.
> No, this is not true.  If a "global" variable (one with external
> linkage) is not declared volatile, then the compiler will assume
> that it cannot change during the execution of the code being
> compiled other than by an assignment it can see within that code.

Note, however, that if there are any calls to other functions in the code region of interest the compiler must assume that any particular global variable has been modified unless it can determine conclusively otherwise.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.