Path: utzoo!mnetor!uunet!mcvax!ukc!warwick!cudcv From: cudcv@daisy.warwick.ac.uk (Rob McMahon) Newsgroups: comp.lang.c Subject: Re: Optimization, volatile (was Re: volatile) Message-ID: <536@sol.warwick.ac.uk> Date: 3 May 88 16:57:09 GMT References: <13074@brl-adm.ARPA> <2003@rtech.UUCP> <503@wsccs.UUCP> Reply-To: cudcv@cu.warwick.ac.uk (Rob McMahon) Organization: Computing Services, Warwick University, UK Lines: 23 In article <503@wsccs.UUCP> terry@wsccs.UUCP (Every system needs one) writes: >In article <2003@rtech.UUCP>, jas@llama.rtech.UUCP (Jim Shankland) writes: >> To get back >> to "volatile": it provides a portable way to declare storage objects >> that may change without notice, and thus is useful in writing portable >> (not necessarily portable *everywhere*, but plenty portable for may uses) >> programs that access device registers, use shared memory, signal handlers, >> etc. (we've been over the whole list). > >yes, it's a nice toy on rare ocassion, but that's why #pragma was invented. It's been said before, but some people seem to have missed it ... how do you use #pragma to specify all of: volatile int *p; int *volatile p; volatile int *volatile p; ? -- UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick.cu ARPA: cudcv@cu.warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England