Path: utzoo!mnetor!uunet!lll-winken!lll-tis!mordor!sri-spam!ames!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.lang.c Subject: Re: volatile (in comp.lang.c) Message-ID: <225800029@uxe.cso.uiuc.edu> Date: 5 May 88 14:48:00 GMT References: <2642@geac.UUCP> Lines: 37 Nf-ID: #R:geac.UUCP:2642:uxe.cso.uiuc.edu:225800029:000:1864 Nf-From: uxe.cso.uiuc.edu!mcdonald May 5 09:48:00 1988 >I know has argued that something like "volatile" isn't useful. >There's no doubt that it is. The question is whether it belongs in ANSI C, >which purports to be a standard for a language for portable programs. >The problem is that volatile means many different things to different people. >Until then, though, let's restrict the standard language to things that we >know how to make portable. I strongly disagree that the definition of a language should be restricted to "portable" things. I think that portability, per se, is a desirable goal with a very low priority. Speed, more speed, lots more speed, a friendly user interface, and general usefulness are much more important. A large fraction of programs today are likely being written for environments like the IBM-PC and the Mac which are connected to specific hardware and operating environment. Most portable programs run on those machines are decidedly inferior to ones written specifically for them. I believe that a language, per se, should be divided into a "portable" part and a language-specified non-portable syntax. I feel that what has been done to C by the ANSI committee is quite exemplary. "Volatile" is a generally useful concept, and seems to me to indicate something useful in enough cases, and also fits nicely into the declaration syntax of the language, that it should stay. I would personally like to see compiler vendors allow inline assembler. For that, a "pragma" would do. The big plus for leaving volatile as-is is that vendors would be FORCED to allow some sort of machine-specific code. It isn't far enough for me, as some vendors are going to make it impossible to ADDRESS the part of memory where the interesting locations lie. The only thing I can do about that is to complain, and not buy their products. Doug McDonald "I want a nifty program, not a portable one"