7 May
2006
7 May
'06
16:16
Randall R Schulz wrote:
On Sunday 07 May 2006 06:23, Per Jessen wrote:
...
Can you elaborate on that, in particular why src cannot lie anywhere in dst. If I was programming assembler, that's a perfectly valid MOV.
There is no guarantee on the order in which source characters are copied to the destination.
Interesting. I guess I had assumed a left-to-right sequence, but perhaps with out-of-order execution ... So would you use memmove() in the otherwise perfectly normal case of strcpy(a, a+2)? It still looks like overkill to me, but if the copying is not guaranted to be in order, well. /Per Jessen, Zürich