Patch for builtin strpbrk
Mark Mitchell
mark@codesourcery.com
Mon Nov 6 16:11:00 GMT 2000
>>>>> "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
More information about the Gcc-patches
mailing list