volatile

Mike Wexler mikew at wyse.wyse.com
Wed Mar 30 05:35:16 AEST 1988


In article <1988Mar29.004454.2867 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>... The principal problem with #pragma
>is that it is not portable, since its semantics are not standardized, but
>the sort of code we're talking about isn't portable anyway.
I would disagree that is isn't possible to write portable code that requires
volatiles. An example(possibly the only one), is the use of System V
or Berkeley shared memory.  With either of these you can have volatile
values in portable(At least to similar Unix systems) programs.  Given
this it might be useful for the Posix standard to require the C compiler
to support volatile or a volatile pragma.



More information about the Comp.lang.c mailing list