On Fri, 2010-04-30 16:14:36 +0200, Joakim Tjernlund <[email protected]> wrote: > Jan-Benedict Glaw <[email protected]> wrote on 2010/04/30 16:10:42: > > On Fri, 2010-04-30 16:08:15 +0200, Joakim Tjernlund > > <[email protected]> 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. > > My view too, but gcc 3.4.6 on gcc does this: [...]
Surely, it may/will work here and there. But it's not portable :) And
I won't rely on a "it worked once" fact.
MfG, JBG
--
Jan-Benedict Glaw [email protected] +49-172-7608481
Signature of: GDB has a 'break' feature; why doesn't it have 'fix' too?
the second :
signature.asc
Description: Digital signature
