Path: utzoo!mnetor!uunet!mcvax!ukc!its63b!aiva!richard From: richard@aiva.ed.ac.uk (Richard Tobin) Newsgroups: comp.lang.c Subject: Re: volatile Message-ID: <311@aiva.ed.ac.uk> Date: 30 Mar 88 20:04:58 GMT References: <12578@brl-adm.ARPA> <1988Mar25.172355.348@utzoo.uucp> <588@imagine.PAWL.RPI.EDU> <1988Mar29.004454.2867@utzoo.uucp> Reply-To: richard@uk.ac.ed.aiva (Richard Tobin) Organization: Bannerman's Bar, Cowgate, Edinburgh Lines: 22 In article <1988Mar29.004454.2867@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >situations. The point is that these are a sufficiently small subset of C >applications that the need should addressed with #pragma, rather than by >cluttering up the type system with it. The principal problem with #pragma >is that it is not portable, since its semantics are not standardized, but >the sort of code we're talking about isn't portable anyway. It's true that any particular instance of the use of such constructs isn't portable, but the concept behind it is. That is, of course code that manipulates a memory-mapped device register (or similar) won't run on different machines, but that doesn't mean that it's unreasonable to have a standard way of expressing that a location is such a register. Furthermore, #pragma isn't even portable between different compilers on the same machine, whereas something like "volatile" is. And it's increasingly common to have more than one C compiler available. -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nss.cs.ucl.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin