Obvious fix for libiberty/md5.c

Paul Koning Paul_Koning@dell.com
Tue Mar 11 14:48:00 GMT 2008


>>>>> "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



More information about the Gcc-patches mailing list