Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ecsvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!mcnc!ecsvax!dgary From: dgary@ecsvax.UUCP (D Gary Grady) Newsgroups: net.unix-wizards Subject: Re: smart compilers Message-ID: <470@ecsvax.UUCP> Date: Mon, 7-Jan-85 14:28:12 EST Article-I.D.: ecsvax.470 Posted: Mon Jan 7 14:28:12 1985 Date-Received: Fri, 11-Jan-85 05:03:12 EST References: <7024@brl-tgr.ARPA> Organization: Duke U Comp Ctr Lines: 21 <> Mark Crispinwrites: > I may be mistaken, but I believe according to the standards it is > not only "poor style" to change a constant which was passed to a subroutine, > it is also undefined what the behavior of the system after that should be. ... > You really have no > hope for catching this at compile-time; the earliest you can do it is when > linking the modules together. What's so hard about the calling program always moving the constant to a work area and passing the address of that? As I said before, that's equivalent to just considering a constant a special case of an expression. -- D Gary Grady Duke University Computation Center, Durham, NC 27706 (919) 684-4146 USENET: {decvax,ihnp4,akgua,etc.}!mcnc!ecsvax!dgary