Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!nrl-cmf!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Broken compilers (Was Portability of passing/operating on structures) Message-ID: <8750@smoke.BRL.MIL> Date: 26 Oct 88 08:45:30 GMT References: <8810111934.AA21941@ucbarpa.Berkeley.EDU> <8308@alice.UUCP> <73946@sun.uucp> <7356@ihlpl.ATT.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <7356@ihlpl.ATT.COM> knudsen@ihlpl.ATT.COM (Knudsen) writes: >Actually I like the semantics that casting any pointer to (char *) >means "keep the numerical address value the same." Conversion from a (object *) to a (char *) produces a pointer to the first byte in the object (thought of as an array of bytes). Whether the first byte is most or least significant within a larger machine integer depends on the architecture. The numerical address (i.e. what you'd get by casting to an integer) need not be the same for the two pointer sizes, although it often will be.