Article View: comp.std.c
Article #1732memcpy
From: Timothy Murphy
Date: Wed, 19 Sep 1990 02:14
Date: Wed, 19 Sep 1990 02:14
21 lines
919 bytes
919 bytes
Recently, while debugging the Unix version of unzip.c, I found a surprising discrepancy between 'memcpy' on various machines. In unzip.c it is assumed that the effect of buf[0] = c; memcpy(buf+1, buf, 20); is to set buf[0] = buf[1] = buf[2] = ... = buf[21] = c. This is indeed the effect with most compilers I tried -- rather surprisingly, to me -- but not with cc on the Sun SparcStation (sun4). Is this a bug on the Sparc, or is memcpy not fully specified? -- Timothy Murphy e-mail: tim@maths.tcd.ie
Technical Details
Message-ID:
<1990Sep19.021418.11574@maths.tcd.ie>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!tcdcs!swift.cs.tcd.ie!maths.tcd.ie!timShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!tcdcs!swift.cs.tcd.ie!maths.tcd.ie!tim From: tim@maths.tcd.ie (Timothy Murphy) Newsgroups: comp.std.c Subject: memcpy Summary: memcpy -- differences in interpretation Keywords: memcpy Message-ID: <1990Sep19.021418.11574@maths.tcd.ie> Date: 19 Sep 90 02:14:18 GMT Organization: Dept. of Maths, Trinity College, Dublin, Ireland. Lines: 21