Path: utzoo!mnetor!uunet!wyse!wyse.wyse.com!mikew From: mikew@wyse.wyse.com Newsgroups: comp.lang.c Subject: Re: A different view of volatile Message-ID: <178@wyse.wyse.com> Date: 4 May 88 01:03:24 GMT Sender: mikew@wyse.wyse.com Reply-To: mikew@wyse.wyse.com () Organization: Wyse Technology Lines: 21 It seems that volatile is ill-defined when combined with operators that operate in-place. A way of alleviating this problem would be to state that conforming programs can't have a volatile variable that is on boths sides of an equal sign, volatile variables can't be used on the left hand side of the following operators: +=, -=, *=, /=, |=, &=, and volatiles can't be used at all with the following operators: ++, --. Example: ... volatile int a,b; int c; a=a; /* illegal */ a=b; /* legal */ a=c; /* legal */ c=a; /* legal */ a=a+c; /* illegal */ a+=c; /* illegal */ ++a; /* illegal */ ...