Volatile (was Re: observability)

Mike McNelly mike at hpfcso.HP.COM
Thu Sep 14 01:41:08 AEST 1989


> In article <1989Sep8.091010.12450 at gdt.bath.ac.uk> exspes at gdr.bath.ac.uk (P E Smee) writes:
> >one might ask why you would want to write a chunk
> >of code that has ZERO effect.

> I sometimes do this during program development. I declare the data
> structures and write the code that operates on them, leaving the i/o
> to worry about later. I may want to compile at this point to check
> for errors in the code.

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.

Mike McNelly
mike%hpfcla at hplabs.hp.com



More information about the Comp.std.c mailing list