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

Darren A mechacoco at gmail.com
Sun Mar 9 17:20:57 EDT 2014


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

> On Sunday 09 March 2014 17:00:09 Christopher R. Hawks did opine:
>
> > On Sun, 09 Mar 2014 13:04:45 -0400
> >
> > Jamie Cho <silurian at icloud.com> wrote:
> > > I tracked the error down to the space() function in cprep19.
> > > Basically, it is no longer legal for strcpy() or memcpy() to be sent
> > > overlapping arrays, but it is ok with memmove().
> >
> >       In Unix/Posix it never was, that's what memmove() is for.
> >
> Are you saying that both of my copies (original and the "ANSI C" versions
> of the K&R books are wrong?


I don't know about K&R, but the ANSI C specification (at least in my 1988
copy) states that the behavior of those two functions are undefined if the
source and destination overlap.



More information about the Coco mailing list