This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch libiberty include]: Add additional helper functions for directory-separator searching
> Date: Tue, 8 Mar 2011 19:51:14 +0100
> From: Kai Tietz <ktietz70@googlemail.com>
> Cc: Pedro Alves <pedro@codesourcery.com>, gdb-patches@sourceware.org,
> gcc-patches@gcc.gnu.org, binutils@sourceware.org
>
> > In my experience, the strchr analog is not needed, only the strrchr
> > one (which could be used quite a lot). ?The few places that use strchr
> > now should actually be rewritten to search from the end, because
> > that's what they need.
> >
>
> Here I am not that sure. For example in gcc's gengtype.c
> (read_input_list) is a use-case for strchr on filenames, which can't
> be expressed by strrchr.
I don't see any reason to have in libiberty a function that has a
single use.