egcs 1.1b and "volatile"
erik.ivanenko
erik.ivanenko@utoronto.ca
Fri Oct 30 02:40:00 GMT 1998
Eric Norum wrote:
> erik.ivanenko@utoronto.ca wrote:
>
> >Is there some way to guarantee that a volatile variable will remain
> >volatile regardless of optimization level? This is critical when
> >writing a device driver that modifies CPU memory. eg. i82596.
>
> The volatile keyword tells the optimizer that the value of the variable in
> question may change in ways that can not be inferred from the C statements.
>
While I was composing my response, ( which included code references ) I
noticed that I had placed the volatile qualifier on only one of two required
places. Sorry for the confusion.
More information about the Gcc
mailing list