register volatile
Doug Gwyn
gwyn at smoke.BRL.MIL
Fri Jan 6 15:48:49 AEST 1989
In article <15304 at mimsy.UUCP>, chris at mimsy.UUCP (Chris Torek) writes:
> For portable code, you must avoid `register volatile', because current
> systems (not dpANS-conformant, but still useful, such as SunOS) will
> use something like
> #define volatile /*empty*/
But that's clearly wrong in the first place. When back-porting to a
pre-ANSI C environment, all uses of "volatile" (there shouldn't be
many) have to be carefully checked to determine just why "volatile"
was necessary, and adjustments made (if possible). There is no viable
alternative!
P.S. I do plant the above definition in pre-ANSI C environments
(although I can't recall using it), but I don't expect it to "do the
right thing" automatically, because it can't.
More information about the Comp.lang.c
mailing list