[Coco] Fwd: MW-C Cross compiler bug - Solved

Chris Osborn fozztexx at fozztexx.com
Sun Mar 9 17:13:19 EDT 2014


On Mar 9, 2014, at 2:01 PM, Gene Heskett wrote:

> Are you saying that both of my copies (original and the "ANSI C" versions 
> of the K&R books are wrong?

Page 250 of my ANSI K&R 2nd Edition book says:

void *memcpy(s,ct,n)		copy n characters from ct to s, and return s.
void *memmove(s,ct,n)	same as memcpy except that it works even if the objects overlap.

So yes, you're supposed to use memmove.

The memcpy vs. memmove saga:

http://www.win.tue.nl/~aeb/linux/misc/gcc-semibug.html


More information about the Coco mailing list