This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: glibc 2.3.1: fix for the i386 inline strings code
- From: Roland McGrath <roland at redhat dot com>
- To: Denis Zaitsev <zzz at cd-club dot ru>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Mon, 6 Jan 2003 23:37:14 -0800
- Subject: Re: glibc 2.3.1: fix for the i386 inline strings code
The lack of parens around macro arguments was rampant in
sysdeps/i386/i486/bits/string.h, and I fixed that.
I've also added a test case to string/tester.c that is perfectly valid C
(using void *) but barfs in the inline case, as you cited.
The problems stem from all these "sizeof((s)[0]) == 1" expressions in the
__builtin_constant_p-true branch of the macros. This appears frequently,
and it makes no sense to me. If the macro has correct function-like
behavior, the arguments in question are all already cast to char * (or
const char *), and so the test is always true. I can't figure what it was
intended for.