From c7b6c6cd4791c3003397feea31482c3d19419fe2 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Mon, 13 Nov 2000 02:14:05 +0000 Subject: 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/builtins.def | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/builtins.def') diff --git a/gcc/builtins.def b/gcc/builtins.def index 980099c..1920282 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -36,6 +36,8 @@ DEF_BUILTIN(BUILT_IN_MEMCMP) DEF_BUILTIN(BUILT_IN_MEMSET) DEF_BUILTIN(BUILT_IN_BZERO) DEF_BUILTIN(BUILT_IN_BCMP) +DEF_BUILTIN(BUILT_IN_INDEX) +DEF_BUILTIN(BUILT_IN_RINDEX) DEF_BUILTIN(BUILT_IN_STRCPY) DEF_BUILTIN(BUILT_IN_STRCMP) DEF_BUILTIN(BUILT_IN_STRLEN) -- cgit v1.1