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

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

Re: [avr-gcc-list] GCC loop optimization and volatile data question


From: J Wunsch
Subject: Re: [avr-gcc-list] GCC loop optimization and volatile data question
Date: Sun, 22 Apr 2001 23:05:38 +0200 (MET DST)

"Larry Barello" <address@hidden> writes:

> extern int some_external_variable;
> ...
> while (...)
> {
>     ...
>     if (some_external_variable == 0)
>         break;
> }
> 
> do I need to declare 'some_external_variable' as volatile?

Sure.  Linkage classes are totally irrelevant for optimization
considerations (which is why you need `volatile').

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

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