Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site unc.UUCP Path: utzoo!watmath!clyde!floyd!harpo!decvax!mcnc!unc!tim From: tim@unc.UUCP (Tim Maroney) Newsgroups: net.lang.c Subject: Re: Can ANSI Standard C be "Optimized" Message-ID: <6999@unc.UUCP> Date: Wed, 28-Mar-84 16:27:15 EST Article-I.D.: unc.6999 Posted: Wed Mar 28 16:27:15 1984 Date-Received: Fri, 30-Mar-84 01:24:14 EST References: <6061@decwrl.UUCP>, <404@decvax.UUCP> <139@homxa.UUCP>, <636@sun.uucp> Organization: CS Dept., U. of N. Carolina at Chapel Hill Lines: 27 J Rather than add the "volatile" attribute to variable O declarations, the C standards committee has taken a safer H alternative: Assume that everything is volatile, but permit it N to be declared "const". An object declared "const" cannot be . modified. Furthermore, the "const" attribute can appear at each J level of indirection; eg O H const char *pcc; N . declares a (modifiable) pointer, which is guaranteed by the J programmer to point to non-modifiable storage (a const char). This does not speak to the problem at hand at all, which is making it possible to optimize code containing references to data which may be changed by external events. By the way, I am somewhat distressed that everyone has decided to talk about string and array comparisons, which were just an aside at the end of the article on improving C's generality, and which really are not very interesting and add nothing to C's generality. Doesn't anyone have anything to say about the rest of my suggestions? Even flames? -- Tim Maroney, The Censored Hacker mcnc!unc!tim (USENET), tim.unc@csnet-relay (ARPA) All opinions expressed herein are completely my own, so don't go assuming that anyone else at UNC feels the same way.