volatile

Daniel R. Levy levy at ttrdc.UUCP
Wed May 18 09:15:30 AEST 1988


In article <11531 at mimsy.UUCP>, chris at mimsy.UUCP (Chris Torek) writes:
# In article <526 at wsccs.UUCP> terry at 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,<most AT&T machines>!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.



More information about the Comp.lang.c mailing list