Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcso!mike From: mike@hpfcso.HP.COM (Mike McNelly) Newsgroups: comp.std.c Subject: Re: Volatile (was Re: observability) Message-ID: <7330001@hpfcso.HP.COM> Date: 13 Sep 89 15:41:08 GMT References: <28993@news.Think.COM> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 17 > In article <1989Sep8.091010.12450@gdt.bath.ac.uk> exspes@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@hplabs.hp.com