Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!psuvax1!psuvax1!flee From: flee@shire.cs.psu.edu (Felix Lee) Newsgroups: comp.std.c Subject: Re: Volatile (was Re: observability) Message-ID: Date: 15 Sep 89 02:51:29 GMT References: <28993@news.Think.COM> <7330001@hpfcso.HP.COM> Sender: news@psuvax1.cs.psu.edu Organization: Penn State University Computer Science Lines: 11 In-reply-to: mike@hpfcso.HP.COM's message of 13 Sep 89 15:41:08 GMT In <7330001@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. Bad assumption. The High C compiler (on IBM RTs) always does at least trivial optimization. Warnings like "Expression has no side effects" and "Variable is never referenced" mean relevant code has disappeared. -- Felix Lee flee@shire.cs.psu.edu *!psuvax1!flee