volatile (applied to automatic variables)
    der Mouse 
    mouse at mcgill-vision.UUCP
       
    Mon Jun 13 19:23:43 AEST 1988
    
    
  
In article <3732 at pasteur.Berkeley.Edu>, faustus at ic.Berkeley.EDU (Wayne A. Christopher) writes:
[responding to a post of Chris Torek's]
> I don't think it makes any sense to declare an automatic variable
> volatile anyway.
Sure it does.  If a pointer to the variable in question gets stored in
some sort of global area and used by a signal handler or another
process (presumably one running in the same address space, so the
pointer makes sense to it), it can be necessary.  ("Necessary" in the
sense in which it's "necessary" to make, say, a device register
volatile.  As Chris has pointed out, volatile is never strictly
necesary - just ban enough optimizations....)
(isn't it fun to   ^   design rivers into prose? :-)
					der Mouse
			uucp: mouse at mcgill-vision.uucp
			arpa: mouse at larry.mcrcim.mcgill.edu
    
    
More information about the Comp.lang.c
mailing list