[Top][All Lists]

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

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

From: Colin Paul Gloster
Subject: Re: [avr-gcc-list] volatile...
Date: Thu, 14 Dec 2006 13:16:35 +0100 (CET)

On Thu, 14 Dec 2006, Javier Almansa Sobrino wrote:

"Hi everybody. I've a little stupid question...."

It seems as if you should consult a book about C or not use a language 
you do not have documentation for.

"What's the differece between a volatile variable in a funcion and the 
same variable not volatile?"

The volatile keyword is a hint to the compiler that it is unsafe to make 
typically sane assumptions about a variable. E.g., the memory address for 
that variable might be memory mapped as the input of a thermistor.

"I've noted a non volatile variable is like don't exists (I think)."

The compiler might optimize away for example a variable which is not 
volatile which is never assigned a value in the C code.

reply via email to

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