[Prism54-devel] On the use of "volatile"

Luis R. Rodriguez mcgrof@ruslug.rutgers.edu
Mon, 12 Jan 2004 13:33:25 -0500 (EST)


In reply to myself,

On Mon, 12 Jan 2004, Luis R. Rodriguez wrote:

>
> On Mon, 12 Jan 2004, kaleda wrote:
>
> > > I believe that both uses of "volatile" are not required, or even
> > > misleading, and thus the "volatile" should be removed.
> >
> > Totally agree.
> > volatile is only the compiler flag, marking not to optimise the actions
> > on variable.
> >
> > BTW in the original intersil source there were no volatile's.
> >
>
> Actually it did have them. I had added some volatiles to the mib just as a
> precaution measure to avoid optimizations around those variables.

I'm 100% OK with them being removed if we're sure any for loops/etc
that rely on them that would *not* be affected by optimizations. If its
just to make code prettier I'd say we just leave them as since AFAIK the
do provide this  protection against optimizations.

My milleages is lower though so I'd trust your judgement.

	Luis