Is memcpy supposed to work when the src and dest are the same:
memcpy(p, p, 100);
Jocke
On Fri, 2010-04-30 16:08:15 +0200, Joakim Tjernlund
joakim.tjernl...@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
Jan-Benedict Glaw jbg...@lug-owl.de wrote on 2010/04/30 16:10:42:
On Fri, 2010-04-30 16:08:15 +0200, Joakim Tjernlund
joakim.tjernl...@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
On Fri, 2010-04-30 16:14:36 +0200, Joakim Tjernlund
joakim.tjernl...@transmode.se wrote:
Jan-Benedict Glaw jbg...@lug-owl.de wrote on 2010/04/30 16:10:42:
On Fri, 2010-04-30 16:08:15 +0200, Joakim Tjernlund
joakim.tjernl...@transmode.se wrote:
Is memcpy supposed to work when the src and
Just a quick comment than Jan-Benedict's opinion is widely shared by the
specification and by the Linux glibc manpage:
DESCRIPTION
The memcpy() function copies n bytes from memory area src to
memory
area dest. The memory areas should not overlap. Use memmove(3)
if the
, April 30, 2010 10:15 AM
To: Jan-Benedict Glaw
Cc: gcc@gcc.gnu.org
Subject: Re: memcpy(p,p,len)
Jan-Benedict Glaw jbg...@lug-owl.de wrote on 2010/04/30 16:10:42:
On Fri, 2010-04-30 16:08:15 +0200, Joakim Tjernlund
joakim.tjernl...@transmode.se wrote:
Is memcpy supposed to work when
On Fri, Apr 30, 2010 at 07:30:33AM -0700, Mark Mielke wrote:
Just a quick comment than Jan-Benedict's opinion is widely shared by the
specification and by the Linux glibc manpage:
DESCRIPTION
The memcpy() function copies n bytes from memory area src to
memory
area
On Fri, Apr 30, 2010 at 5:05 PM, Joe Buck joe.b...@synopsys.com wrote:
On Fri, Apr 30, 2010 at 07:30:33AM -0700, Mark Mielke wrote:
Just a quick comment than Jan-Benedict's opinion is widely shared by the
specification and by the Linux glibc manpage:
DESCRIPTION
The memcpy()
On Fri, Apr 30, 2010 at 08:29:19AM -0700, Richard Guenther wrote:
On Fri, Apr 30, 2010 at 5:05 PM, Joe Buck joe.b...@synopsys.com wrote:
On Fri, Apr 30, 2010 at 07:30:33AM -0700, Mark Mielke wrote:
Just a quick comment than Jan-Benedict's opinion is widely shared by the
specification and by