Re: A lint classic
From: CodeSprite (debate_at_codesprite.com)
Date: 08 Jun 2004 16:19:03 GMT
"Ulf Samuelsson" <firstname.lastname@example.org> wrote in
> If you declare the "var" as volatile, then you cannot read "var" more
> than once.
Hmmm... this is the opposite to the definition of volatile as I
understand it; marking a variable as 'volatile' should inform the
compiler that it must make no assumptions about the contents of the
variable since it may have changed since it was last read.
The variable will therefore be read every time it is used rather than
being assumed to be equal to a copy held in a register or on the stack.