Path: utzoo!attcan!uunet!husc6!mailrus!ames!joyce!sri-unix!garth!smryan From: smryan@garth.UUCP (Steven Ryan) Newsgroups: comp.lang.c Subject: Re: volatile: a summary Message-ID: <860@garth.UUCP> Date: 2 Jul 88 21:44:21 GMT References: <16361@brl-adm.ARPA> Reply-To: smryan@garth.UUCP (Steven Ryan) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 18 > My fear is that we'll just keep adding >new storage classes or other keywords as they are needed, making the >language more and more complicated, rather than trying to develop a >more general solution that fits within the current language. My personal favorite is to first come up a computable total predicate that verifies aliassing or whatever. Give the predicate a name the compiler knows about, possibly restricting it to assertions, so that one could write assert(distinct(a,b)) Then the compiler is given a predicate it can recognise and use for optimisation and the programmer is given a construct that can (optionally) verify the stated conditions. If the compiler can prove the predicate, it can delete, otherwise its inclusion is left to the programmer. Subscript checking is sometimes done in this fashion, although the assert mechanism is often hidden.