Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.7 $; site ndm20 Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!inuxc!pur-ee!uiucdcs!convex!ndm20!tp From: tp@ndm20 Newsgroups: net.lang.c Subject: Re: Dumb question on dyn. mem. alloc (i Message-ID: <3400001@ndm20> Date: Tue, 30-Jul-85 12:06:00 EDT Article-I.D.: ndm20.3400001 Posted: Tue Jul 30 12:06:00 1985 Date-Received: Sat, 3-Aug-85 01:37:10 EDT References: <1035@homxa.UUCP> Lines: 12 Nf-ID: #R:homxa.UUCP:-103500:ndm20:3400001:000:764 Nf-From: ndm20!tp Jul 30 11:06:00 1985 >I just realised a major problem with (void *). On machines like the HP-1000 >a pointer to a byte and a pointer to a word don't have the same bit-pattern. That is probably try of ANY machine which is addressed by some unit larger than a byte. We use a Harris H series computer, which is word addresseable (24-bit words, even), and a pointer to a char definately does NOT look like a pointer to anything else. You have to cast them properly. I don't know about void, as I haven't seen the ANSI C draft, but on the Harris, anything that returns a "generic" pointer must return a char pointer with word alignment. It then MUST be cast to the appropriate type (which reformats the pointer properly). A pointer to void would presumably have to use the same approach.