Path: utzoo!mnetor!uunet!pwcmrd!skipnyc!atpal!tneff From: tneff@atpal.UUCP (Tom Neff) Newsgroups: comp.lang.c Subject: Re: volatile, noalias and optimization Message-ID: <135@atpal.UUCP> Date: 27 Apr 88 15:23:57 GMT References: <20345@pyramid.pyramid.com> <132@atpal.UUCP> <3637@haddock.ISC.COM> Reply-To: tneff@atpal.UUCP (Tom Neff) Organization: Rational Technologies, Inc. Lines: 21 Summary: Score one for the Walking Lint In article <3637@haddock.ISC.COM> karl@haddock.ima.isc.com (Karl Heuer) asks: >In article <132@atpal.UUCP> uunet!pwcmrd!skipnyc!atpal!tneff (Tom Neff) writes: >>This is a wonderful feature ... but shouldn't we use >> #pragma volatile(var1, var2, var3) >>instead of imposing a new keyword on the language grammar? > >Unless you expand on this a bit, it's not as powerful. I've actually used the >declaration "char volatile * volatile p;" (a volatile pointer to volatile >memory) -- would your proposal handle this? You're right, Karl, the #pragma approach wouldn't work for nested volatile references like your example, and I can't think of a graceful way to extend my proposal to deal with it either. I guess, then, that the compelling argument for extending the name space to include volatile is that it needs syntactic access to the declarations themselves. Thanks for pointing this out! (It's amazing how sweet tempered one feels on reading of noalias's demise...) -- Tom Neff UUCP: ...uunet!pwcmrd!skipnyc!atpal!tneff "None of your toys CIS: 76556,2536 MCI: TNEFF will function..." GEnie: TOMNEFF BIX: are you kidding?