memcpy(p,p,len)
Jan-Benedict Glaw
jbglaw@lug-owl.de
Fri Apr 30 14:13:00 GMT 2010
On Fri, 2010-04-30 16:08:15 +0200, Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:
> Is memcpy supposed to work when the src and dest are the same:
> memcpy(p, p, 100);
It may work, but you cannot rely on it. Use memmove() alternatively.
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de +49-172-7608481
Signature of: Alles sollte so einfach wie möglich gemacht sein.
the second : Aber nicht einfacher. (Einstein)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20100430/48a7e1d0/attachment.sig>
More information about the Gcc
mailing list