Optimization (was Re: volatile)

Greg Limes limes at sun.uucp
Tue Apr 26 03:25:26 AEST 1988


In article <280 at fxgrp.UUCP> ljz at fx.com (Lloyd Zusman) writes:
>The ANSI committee could specify that the 'volatile' #pragma option either
>does nothing (without generating an error) or else work as 'volatile'
>is now specified.  Wouldn't this be more satisfactory than the current
>proposal?

<risking flames, floods, pestilance, creme pies, and easy chairs>

Who do I send my vote for "#pragma volatile" to? Methinks this is an
implementation issue, for which the manual would read:

  -O#	Optimises uses of external variables. Any external variables
	that may be modified asynchronously, i.e. external device
	registers or variables modified in signal handlers, should be
	marked as "volatile" by use of the statment
		#pragma volatile(foo, bar)

since this is not part of the language. Currently, SUN has a warning in
the manual that the higher levels of optimization should not be used
when compiling programs that modify external variables from within
signal handlers.

Can you say "implementation issue"? I knew you could.

DISCLAIMER: I am not in the compler group, and do not speek for them.
-- 
   Greg Limes [limes at sun.com]				frames to /dev/fb



More information about the Comp.lang.c mailing list