Volatile (was Re: observability)

Bill Poser poser at csli.Stanford.EDU
Thu Sep 14 13:48:41 AEST 1989


In article <7330001 at hpfcso.HP.COM> mike at hpfcso.HP.COM (Mike McNelly) writes:
>
>Ah, but any compiler that has optimization capabilities that would allow
>it to nullify a useless program invariably does not do such optimization
>unless you ask for it with flags such as -O. My guess is that you don't
>optimize such a program during development, only after development is
>nearly complete.

True, but I often just stick the optimization flag in the Makefile
and don't bother to turn it off during testing. Anyhow, the question I
answered was why one might want to write a "useless" code fragment.
I agree that a compiler that optimizes such a fragment into nothingness
is not a problem if one can disable the optimization.

							Bill



More information about the Comp.std.c mailing list