This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Obvious fix for libiberty/md5.c
- From: Paul Koning <Paul_Koning at dell dot com>
- To: nickc at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Mar 2008 10:47:50 -0400
- Subject: Re: Obvious fix for libiberty/md5.c
- References: <y103aqx1hji.fsf@redhat.com>
>>>>> "Nick" == Nick Clifton <nickc@redhat.com> writes:
Nick> Hi Guys, I hope that the following patch counts as obvious: The
Nick> md5_process_bytes() routine in libiberty/md5.c uses the return
Nick> value of the memcpy() function, but under certain circumstances
Nick> memcpy can be aliased to bcopy() and bcopy does not have a
Nick> return value.
Given that memcpy is documented to return a value, and bcopy is
documented not to, doesn't that mean that aliasing memcpy as bcopy is
an error? In other words, md5.c is correct but the aliasing you
mentioned is the bug?
paul