volatiles

Doug Gwyn gwyn at brl-smoke.ARPA
Mon Apr 25 02:34:16 AEST 1988


In article <10242 at ulysses.homer.nj.att.com> jss at hector (Jerry Schwarz) writes:
>The introduction of "volatile" changes the situation. ...
>I still think that it's a good idea but I no longer think (as I used
>to) that it is a simple one.

My opinion is that "volatile" provides a hook for implementation-specific
control over accesses to variables that might be botched by optimizations.
However, there is no portable meaning for "volatile".

Its main advantage lies in its ABSENCE, which gives the implementation
license to optimize the hell out of it (so long as aliasing is properly
maintained).



More information about the Comp.lang.c mailing list