This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for builtin strpbrk
- To: ghazi at caip dot rutgers dot edu
- Subject: Re: Patch for builtin strpbrk
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 06 Nov 2000 16:07:46 -0800
- Cc: gcc-patches at gcc dot gnu dot org, jsm28 at cam dot ac dot uk
- Organization: CodeSourcery, LLC
- References: <200011062357.SAA19180@caip.rutgers.edu>
>>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
Kaveh> The following patch adds a builtin strpbrk which behaves as
Kaveh> listed in: http://gcc.gnu.org/projects/.
Kaveh> It transforms the cases where the second argument is a
Kaveh> constant string, either "" or "c" where `c' is any one
Kaveh> character. I.e.:
>> strpbrk(foo, "") -> NULL strpbrk(foo, "c") -> strchr(foo, c)
Kaveh> Bootstrap and testsuite underway. Assuming no regressions,
Kaveh> okay to install?
Yes.
You might as well also do the case where both operands are constants;
that can always be computed at compile-time...
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com