Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!hc!fu From: fu@hc.DSPO.GOV (Castor L. Fu) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: pointer alignment when int != char * Message-ID: <5867@hc.DSPO.GOV> Date: Sun, 5-Jul-87 21:07:35 EDT Article-I.D.: hc.5867 Posted: Sun Jul 5 21:07:35 1987 Date-Received: Mon, 6-Jul-87 00:39:26 EDT References: <493@its63b.ed.ac.uk> <6061@brl-smoke.ARPA> <3812@spool.WISC.EDU> Reply-To: fu@hc.dspo.gov.UUCP (Castor L. fu) Organization: Group E-10, Los Alamos National Laboratory, NM Lines: 28 Xref: mnetor comp.lang.c:2841 comp.unix.wizards:3119 In article <3812@spool.WISC.EDU> lm@cottage.WISC.EDU (Larry McVoy) writes: >In article <6061@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) writes: >>integral types to do the rounding operations. (long) is appropriate >>for portable code. (If a (char *) won't fit into a (long), you have >>real problems!) > >I'm not sure this is true anymore. Don't some supercomputers make >longs 32 bits, long longs 64 bits, and have addresses > 32 bits and < 64 bits? >I seem to remember that someone said something like that recently. > >Larry McVoy lm@cottage.wisc.edu or uwvax!mcvoy Well, I am not positive about how the C compiler is organized, (who wants to use a compiler which can barely vectorize on a cray?) However, the FORTRAN compiler's primary data type for integers is 64 bits wide. Internally, the addressing registers are only 24 bits wide. (The machine has no virtual memory, and 24 bits addresses 16 megawords which is still 128Mbytes, so the need for 32 bit or 64 bit addressing is questionable.) Anyways this has lead to much grief for myself when I found library routines which never expected to see things bigger than 8 Megwords (since the integers are signed.). So I guess the moral of the story is that sizeof ( char *) < sizeof(int) is also quite possible in some wierd implementations. -Castor Fu fu@hc.dspo.gov