From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10806 invoked by alias); 8 Mar 2011 19:54:36 -0000 Received: (qmail 10778 invoked by uid 22791); 8 Mar 2011 19:54:35 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_05,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Mar 2011 19:54:30 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LHR00C008L4V900@a-mtaout20.012.net.il>; Tue, 08 Mar 2011 21:54:27 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.58.59]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LHR00B138MPQQE0@a-mtaout20.012.net.il>; Tue, 08 Mar 2011 21:54:27 +0200 (IST) Date: Tue, 08 Mar 2011 19:59:00 -0000 From: Eli Zaretskii Subject: Re: [patch libiberty include]: Add additional helper functions for directory-separator searching In-reply-to: To: Kai Tietz Cc: pedro@codesourcery.com, gdb-patches@sourceware.org, gcc-patches@gcc.gnu.org, binutils@sourceware.org Reply-to: Eli Zaretskii Message-id: <83zkp5fkwe.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <201103081243.34340.pedro@codesourcery.com> <201103081333.03177.pedro@codesourcery.com> <838vwph30i.fsf@gnu.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00568.txt.bz2 > Date: Tue, 8 Mar 2011 19:51:14 +0100 > From: Kai Tietz > Cc: Pedro Alves , 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.