observability

Alan J Rosenthal flaps at dgp.toronto.edu
Thu Sep 7 08:33:49 AEST 1989


bvs at light.uucp (Bakul Shah) writes:
>I have some questions about `observable behavior'.  How does this
>concept interact with `volatile' variables? with debuggers? with
>shared memory?

Debuggers and shared memory are not specified in the ansi C standard.
That is, there does not exist behaviour of debuggers or of shared memory
that violate the standard.

Many people claim that "volatile" is meaningless since it is not observable.

>Is a program with *no* output of any kind observable?

Yes, you can observe that it produced no output, a different observation from
observing it producing some output.  However, the ansi C standard probably
doesn't prevent "int main() { return(0); }" from outputting, as a concession to
verbose environments.  So there might not exist standard-violating behaviour
for the execution of a program which produces no output.

ajr



More information about the Comp.std.c mailing list