Path: utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!ames!umd5!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Alignment issues and SPARC (commentary) Message-ID: <7959@brl-smoke.ARPA> Date: 23 May 88 18:11:12 GMT References: <326@apexepa.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 7 In article <326@apexepa.UUCP> gary@apexepa.UUCP (Gary Wisniewski) writes: > 2. I regretted making some assumptions about the viability of > memcpy(buf, (char *)&h, sizeof(h)); > where 'h' is anything but a char. What's the problem? memcpy() certainly does not require any particular alignment of the data it copies. (Overlaps may yield surprises, though.)