[PATCH] Do not transform strchr into rawmemchr
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Thu Nov 17 11:22:00 GMT 2016
Zack Weinberg wrote:
> I endorse the removal of the non-optimization, but ...
> ... wouldn't it be just as effective to remove this block entirely?
> That is, don't #define strchr at all.
Well that's a good question. Most string functions directly use the GCC
builtin either via a define or via an inline function, so I simply follow that
convention.
However is there any benefit in doing so? If there is no benefit then we could
remove a lot of code from the GLIBC headers, particularly string.h (and your
covariance patch could become even simpler without the inline functions).
Wilco
More information about the Libc-alpha
mailing list