Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site cray.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!stolaf!cray!hrp From: hrp@cray.UUCP (Hal Peterson) Newsgroups: net.lang.c Subject: Re: Re: type cast in initializer Message-ID: <305@cray.UUCP> Date: Mon, 3-Feb-86 13:53:51 EST Article-I.D.: cray.305 Posted: Mon Feb 3 13:53:51 1986 Date-Received: Wed, 5-Feb-86 07:04:54 EST References: <302@hsi.UUCP> <1450@bbncc5.UUCP> Organization: Cray Research Inc., Mendota Heights, MN Lines: 12 > > int x = 0; > > char *ptr = (char *) &x; > > In any case, I'm not sure why you'd want to do what your example does, > since the cast here is a no-op. An int pointer does not necessarily have the same format as a char pointer. Consider a word addressible machine on which the char's are packed into the words. -- Hal Peterson / Cray Research / 1440 Northland Dr. / Mendota Hts, MN 55120 UUCP: ihnp4!cray!hrp phone: (612) 681-3085