builtins.c (expand_builtin): Handle BUILT_IN_INDEX and BUILT_IN_RINDEX.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Mon, 13 Nov 2000 02:14:05 +0000 (02:14 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Mon, 13 Nov 2000 02:14:05 +0000 (02:14 +0000)
commitc7b6c6cd4791c3003397feea31482c3d19419fe2
treee2619415f3516210288dc043ad4cdec1be4247a5
parent34f6fbdb65c5e2a8ff1c6553592503532ef0141f
builtins.c (expand_builtin): Handle BUILT_IN_INDEX and BUILT_IN_RINDEX.

* builtins.c (expand_builtin): Handle BUILT_IN_INDEX and
BUILT_IN_RINDEX.  Add missing checks for BUILT_IN_STRCHR and
BUILT_IN_STRRCHR.

* builtins.def (BUILT_IN_INDEX, BUILT_IN_RINDEX): New entries.

* c-common.c (c_common_nodes_and_builtins): Declare index and
rindex when nonansi builtins are allowed.

* extend.texi (index, rindex): Document new builtins.

testsuite:
* gcc.c-torture/execute/string-opt-3.c: Also test builtin rindex.
* gcc.c-torture/execute/string-opt-4.c: Also test builtin index.

From-SVN: r37416
gcc/ChangeLog
gcc/builtins.c
gcc/builtins.def
gcc/c-common.c
gcc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/string-opt-3.c
gcc/testsuite/gcc.c-torture/execute/string-opt-4.c