This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs 1.1b and "volatile"


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.
begin:          vcard
fn:             Erik Ivanenko
n:              Ivanenko;Erik
org:            University of Toronto
email;internet: erik.ivanenko@utoronto.ca
title:          Supervisor, Controls Services
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
version:        2.1
end:            vcard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]