#define volatile /*empty*/

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Jan 7 11:43:28 AEST 1989


In article <9300 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>I think that's the only PORTABLE use, but certainly a standard-
>conforming program CAN use the "volatile" type qualifier in other
>(nonportable) contexts.

It occurs to me that I may not have made this clear enough.
A portable, standard-conforming program does not become nonportable
or non-conforming upon addition of "volatile" qualifiers (assuming
of course the addition is done according to the type rules).
It is only the actual reliance upon the property of volatility that
would be nonportable.  (e.g. device register)

	int main() { volatile int i; return i = 0; }
is a portable, standard-conforming program.



More information about the Comp.lang.c mailing list