Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!yetti!geac!daveb From: daveb@geac.UUCP (Brown) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: pointer alignment when int != char * Message-ID: <1300@geac.UUCP> Date: Wed, 2-Sep-87 08:40:03 EDT Article-I.D.: geac.1300 Posted: Wed Sep 2 08:40:03 1987 Date-Received: Thu, 3-Sep-87 04:10:04 EDT References: <493@its63b.ed.ac.uk> <6061@brl-smoke.ARPA> <3812@spool.WISC.EDU> <588@murphy.UUCP> <26910@sun.uucp> Reply-To: daveb@geac.UUCP (Dave Collier-Brown) Organization: The little blue rock next to that twinkly star. Lines: 25 Xref: mnetor comp.lang.c:4080 comp.unix.wizards:4001 In article <26910@sun.uucp> guy@gorodish.UUCP writes: >> ... there should be a way to take any pointer and generate a byte >> offset from byte 0 in whatever address space the code is running in. The >> reason is that you need such a beast to feed to lseek if you want to access >> something through one of the /dev/mem devices (or maybe /proc). > >The standard should NOT address this. The standard mentions neither "lseek" >nor "/dev/mem" nor "/proc". This sort of thing is rather non-portable, and is >as such completely outside the scope of the standard. I agree that the standard should not address machine-specific issues (and especially /dev/mem), but the implementors of particular compilers for the language need to address the question. (this is more of an arch. than a c discussion, however). The Adavolutians have chosen to relegate the discussion of what optional features a particular compiler has implemented to a specific appendix: the standard writers might well define such an appendix for the C language. It can then address such issues where the poor client might be able to find it. --dave (I once did QA on a compiler: never again) c-b -- David Collier-Brown. {mnetor|yetti|utgpu}!geac!daveb Geac Computers International Inc., | Computer Science loses its 350 Steelcase Road,Markham, Ontario, | memory (if not its mind) CANADA, L3R 1B3 (416) 475-0525 x3279 | every 6 months.