This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs 1.1b and "volatile"
- To: "rtems-snapshots at advicom dot net" <rtems-snapshots at advicom dot net>, egcs <egcs at cygnus dot com>
- Subject: Re: egcs 1.1b and "volatile"
- From: "erik.ivanenko" <erik dot ivanenko at utoronto dot ca>
- Date: Thu, 29 Oct 1998 16:11:29 -0800
- References: <199810290344.VAA05838@shaw.wave.ca>
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