Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!ima!mirror!datacube!ftw From: ftw@datacube.UUCP Newsgroups: comp.lang.c Subject: Re: volatile question Message-ID: <102600002@datacube> Date: Wed, 29-Apr-87 11:12:00 EDT Article-I.D.: datacube.102600002 Posted: Wed Apr 29 11:12:00 1987 Date-Received: Fri, 1-May-87 04:27:49 EDT References: <7125@brl-adm.ARPA> Lines: 16 Nf-ID: #R:brl-adm.ARPA:-712500:datacube:102600002:000:535 Nf-From: datacube.UUCP!ftw Apr 29 11:12:00 1987 I believe the following should work: volatile char *ptr_to_volatile; /* variable pointer to a volatile char */ char *volatile volatile_ptr; /* volatile pointer to a variable char */ The former tells the compiler not to do anything silly (optimize) with the object pointed at, and the latter instructs the compiler to not optimize any usage of the pointer. This also is applicable to the "const" keyword; the above code example is my paraphrasing of the October '86 draft standard. Farrell Woods, Datacube, Inc.