Optimization, volatile (was Re: volatile)
Rob McMahon
cudcv at daisy.warwick.ac.uk
Wed May 4 02:57:09 AEST 1988
In article <503 at wsccs.UUCP> terry at wsccs.UUCP (Every system needs one) writes:
>In article <2003 at rtech.UUCP>, jas at 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 at uk.ac.warwick.cu ARPA: cudcv at cu.warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
More information about the Comp.lang.c
mailing list