Path: utzoo!attcan!uunet!husc6!uwvax!oddjob!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: volatile Message-ID: <11531@mimsy.UUCP> Date: 17 May 88 10:52:26 GMT References: <20345@pyramid.pyramid.com> <502@wsccs.UUCP> <51431@sun.uucp> <526@wsccs.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 21 In article <526@wsccs.UUCP> terry@wsccs.UUCP (Every system needs one) writes: >Why can't the compiler figure out what is volitile and >THEN optimize without being hit over the head? In many cases it can. This is one of several reasonably good arguments against volatile. One pro-volatile (or #pragma) counterargument is that it helps the reader to realise that there is something unusual going on here too---not that this cannot be done with a comment. >>Compiler technology is getting really good, and we need a way to tell >>the optimisers that strange things can happen. >If it's sooooo advanced, it could determine volatility (or aliasing) >without me having to tell it. Could and should: I agree. But (as dmr put it) the nice thing about `volatile' is that the average programmer can ignore it; this was not true of `noalias'. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris