[PATCH] Fix i386 <bits/string.h>

Andreas Schwab schwab@suse.de
Sun Jun 13 21:39:00 GMT 2004


Jakub Jelinek <jakub@redhat.com> writes:

> --- libc/sysdeps/i386/bits/string.h.jj	2003-09-05 06:03:03.000000000 -0400
> +++ libc/sysdeps/i386/bits/string.h	2004-06-13 15:35:35.000000000 -0400
> @@ -43,8 +43,8 @@
>  #define _HAVE_STRING_ARCH_memcpy 1
>  #define memcpy(dest, src, n) \
>    (__extension__ (__builtin_constant_p (n)				      \
> -		  ? __memcpy_c (dest, src, n)				      \
> -		  : memcpy (dest, src, n)))
> +		  ? __memcpy_c ((dest), (src), (n))			      \
> +		  : memcpy ((dest), (src), (n))))

These parens are useless.  It is impossible to pass a comma inside a macro
argument without putting it in parens itself.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Libc-hacker mailing list