Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!mhuxn!mhuxr!ulysses!allegra!mit-eddie!think!harvard!seismo!hao!hplabs!tektronix!uw-beaver!uw-june!entropy!dataio!bright From: bright@dataioDataio.UUCP (Walter Bright) Newsgroups: net.lang.c Subject: Re: unary + Message-ID: <951@dataioDataio.UUCP> Date: Wed, 9-Apr-86 13:16:35 EST Article-I.D.: dataioDa.951 Posted: Wed Apr 9 13:16:35 1986 Date-Received: Sun, 20-Apr-86 00:41:50 EST References: <2323@brl-smoke.ARPA> <687@bentley.UUCP> Reply-To: bright@dataio.UUCP (Walter Bright Organization: Data I/O Corp., Redmond WA Lines: 29 In article <687@bentley.UUCP> kwh@bentley.UUCP (KW Heuer) writes: >[3] Someone proposed using "a+(volatile)(b+c)". I think this is workable, >though not quite the same meaning as volatile applied to a simple variable. Not even close! 'volatile' means to the compiler: o The value of the variable can change anytime (asynchronously), and the value can be read anytime (asynchronously) independently of the executing program (such as an I/O port register). The ramifications of this are from the compiler's perspective: 1) Do not remove redundant reads of the variable. 2) Do not remove dead assignments to the variable. Producing another definition which means: o Do not reorder the expression. is a totally distinct meaning. I'm totally against such overloading of the meaning of 'volatile'. It makes about as much intuitive sense as: "a+(while)(b+c)" which is also easily implementable, but very confusing. For all of those of you out there who were confused by the two distinct meanings of the keyword 'static', speak up! (By the way, the meanings of static are: 1. If outside the scope of a function, do not make the symbol global. 2. If inside the scope of a function, allocate storage in the data segment instead of on the stack. ) -- Row well, and live. --