This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc vs Darwin memcmp
- From: Dale Johannesen <dalej at apple dot com>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Cc: Dale Johannesen <dalej at apple dot com>
- Date: Fri, 15 Jul 2005 13:06:50 -0700
- Subject: gcc vs Darwin memcmp
Darwin's memcmp has semantics that are an extension of the language
standard:
The memcmp() function returns zero if the two strings are
identical, oth-
erwise returns the difference between the first two differing bytes
(treated as unsigned char values, so that `\200' is greater than
`\0',
for example).
gcc's x86 inline expansion of memcmp doesn't do this, so I need to fix
it. Is there
interest in having this in mainline, and if so how would you like it
controlled?