From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-10-01 06:39:04
Alexander Terekhov wrote:
> Peter Dimov wrote:
>>> C'mon, volatile is brain-dead.
>> Nobody's arguing otherwise. ;-) But a nop it isn't.
> Nop works just fine for your volatile accesses. You can't prove non-
> conformance without trying to fool the program using debugger (or
> things like that... beyond the scope of the standard).
Argh. The standard says that the compiler MUST ASSUME that volatile variable
accesses ARE OBSERVABLE by things OUTSIDE OF THE SCOPE of the standard!
That's the whole and only point of volatile! (CAPS are emphasis and not
shouting. I wonder what genius came up with the idea that you can shout in a
> Innocent until proven guilty, you know.
No, "as if" doesn't work that way. You must prove your innocence.
Look at it this way:
Nop works just fine for your printf statements. You can't prove
non-conformance without trying to look at a screen (or things like that...
beyond the scope of the standard).
Nop works just fine for your whole program. You can't prove nonconformance
without trying to run it.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk