Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site wdl1.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!zehntel!dual!amdcad!fortune!wdl1!jbn From: jbn@wdl1.UUCP Newsgroups: net.unix-wizards Subject: Re: smart compilers Message-ID: <191@wdl1.UUCP> Date: Tue, 15-Jan-85 16:42:10 EST Article-I.D.: wdl1.191 Posted: Tue Jan 15 16:42:10 1985 Date-Received: Sun, 20-Jan-85 06:20:31 EST Sender: jrb@wdl1.UUCP Organization: Ford Aerospace, Western Development Laboratories Lines: 13 Nf-ID: #R:brl-tgr:-660100:wdl1:17100043:000:721 Nf-From: wdl1!jbn Dec 20 20:21:00 1984 Trouble comes when the language semantics are so loose that efficient code generation is impossible without making assumptions that are true almost all of the time, but not all the time. In C, for example, there is an assumption that pointers point to memory, not non-memory objects such as devices. In the Berkeley VAX compiler, code sequences involving shifting and masking may generate VAX field-extract functions. But the VAX does not implement these instructions for UNIBUS space, so this is an optimization not always valid. Assuming that the ``volatile'' keyword is a data attribute (i.e., one writes "static volatile char device_input_register") this is an appropriate way to deal with the problem.