Path: utzoo!attcan!uunet!husc6!bloom-beacon!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.lang.c Subject: Re: volatile (applied to automatic variables) Message-ID: <1161@mcgill-vision.UUCP> Date: 13 Jun 88 09:23:43 GMT References: <11783@mimsy.UUCP> <20345@pyramid.pyramid.com> <502@wsccs.UUCP> <3732@pasteur.Berkeley.Edu> Organization: McGill University, Montreal Lines: 19 In article <3732@pasteur.Berkeley.Edu>, faustus@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@mcgill-vision.uucp arpa: mouse@larry.mcrcim.mcgill.edu