Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!pacbell!att!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: comp.lang.c Subject: Re: volatile Message-ID: <2674@ttrdc.UUCP> Date: 17 May 88 23:15:30 GMT References: <20345@pyramid.pyramid.com> <502@wsccs.UUCP> <51431@sun.uucp> <11531@mimsy.UUCP> Organization: AT&T, Skokie, IL Lines: 21 In article <11531@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes: # 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? # >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 ^^^^^ Hey, I thought this was chewed over some time back. This isn't always possible. Incremental compilation is one problem (can that global change over this operation or can't it? I dunno, I can't see the other modules, so I'll play it safe). (Hmmm, what about smart linkers which could make the final judgment call on an optimization?) How about variables which map into references to special hardware -- the compiler doesn't know if optimizing access to them is safe or not. How about shared memory? -- |------------Dan Levy------------| Path: ihnp4,!ttrdc!levy | AT&T | Weinberg's Principle: An expert is a | Data Systems Group | person who avoids the small errors while |--------Skokie, Illinois--------| sweeping on to the grand fallacy.