Alignment issues and SPARC (commentary)

Doug Gwyn gwyn at brl-smoke.ARPA
Tue May 24 04:11:12 AEST 1988


In article <326 at apexepa.UUCP> gary at 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.)



More information about the Comp.lang.c mailing list