Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: volatiles Message-ID: <1988Apr16.220426.15293@utzoo.uucp> Organization: U of Toronto Zoology References: <1394@pt.cs.cmu.edu> <1530@dataio.Data-IO.COM>, <1412@pt.cs.cmu.edu> Date: Sat, 16 Apr 88 22:04:26 GMT > ... volatile is just a HACK to make the > optimization technique work! volatile adds no additional expressive > power to the language, neither is it adding convenience - it only > tell the optimizer where it is about to goof up so the optimizer > doesn't commit a blunder! This whole debate is entirely a matter of definitions. If you believe, deep down in your heart, that C is basically a sequential language and the compiler is entitled to assume that, then such optimizations are entirely legitimate. If you believe, deep down in your heart, that C ought to be parallel-capable with no effort on your part, then of course such optimizations are abominations that should not have to be explicitly disabled. There is no point in screaming at each other in attempts to change the other's mind; you are arguing from different underlying assumptions, and no amount of rational (or irrational) debate will change anyone's mind unless the assumptions change. Historically, by the way, C has been a sequential language and parallel folks have had to watch their step and make allowances. I see no reason to change this. In fact I see reasons not to change it, since parallelism requires care anyway -- not every multiprocessor machine has hardware- guaranteed cache consistency, for example -- and most existing C code requires no parallelism and would prefer to run fast. -- "Noalias must go. This is | Henry Spencer @ U of Toronto Zoology non-negotiable." --DMR | {ihnp4,decvax,uunet!mnetor}!utzoo!henry