volatile, noalias and optimization

Tom Neff tneff at atpal.UUCP
Thu Apr 28 01:23:57 AEST 1988


In article <3637 at haddock.ISC.COM> karl at haddock.ima.isc.com (Karl Heuer) asks:
>In article <132 at 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?



More information about the Comp.lang.c mailing list