This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Obvious fix for libiberty/md5.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]