Semi constant expressions

Bakul Shah bvs at light.uucp
Thu Sep 7 02:07:04 AEST 1989


In article <10937 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>  ...
>The run-time behavior of a C program is defined in terms of the operation
>of a "virtual machine" (with some deliberately fuzzy areas in its
>specification, so it's really a class of virtual machines) and input/output
>operations (which are usually what makes the program's behavior observable).
>A correct implementation must produce observable results identical to those
>that would be produced by the virtual machine (actually, by some member of
>the class of virtual machines).

I have some questions about `observable behavior'.  How does this
concept interact with `volatile' variables? with debuggers? with
shared memory?

Are volatile variables considered to be observable within their
scope at all times (or at sequence points)?  Is this mechanism
sufficient for indicating that an object is observable?

While debugging a piece of code I may want everything accessed from
it to be observable.  Should a compiler treat such variables as
volatile?

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

Some discussion on this subject would be helpful.  Thanks

-- Bakul Shah <..!{ames,sun,ucbvax,uunet}!amdcad!light!bvs>



More information about the Comp.std.c mailing list