volatile

Karl Heuer karl at haddock.ISC.COM
Wed May 18 05:37:26 AEST 1988


In article <23502 at pyramid.pyramid.com> cquenel at pyramid.UUCP writes:
>In article <4025 at haddock.ISC.COM> karl at haddock.ima.isc.com (Karl Heuer) writes:
>>If |volatile| were removed, we'd either have to go back to the old rules
>>(everything's volatile) or absorb its meaning into |sig_atomic_t|.
>
>To the best of my knowledge, "volatile" is the only way of /guaranteeing/
>that a (for instance) local variable will NOT be restored/affected by a
>longjmp().

True.  In addition to absorbing its meaning into |sig_atomic_t|, we'd have to
add a guarantee that setjmp()/longjmp() will properly synchronize *all*
objects (which some of us think should be done anyway).

X3J11 vetoed this because it would setjmp() magic.  I expect that a proposal
to make sig_atomic_t magic would be even worse.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.std.c mailing list