diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-13 02:14:05 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-13 02:14:05 +0000 |
commit | 398aae3643061632304567b00307fc5548b0d64c (patch) | |
tree | e2619415f3516210288dc043ad4cdec1be4247a5 /gcc/extend.texi | |
parent | 4ec87d685dcd7fc38ac08cde1db83f6431ab6c6c (diff) | |
download | ppe42-gcc-398aae3643061632304567b00307fc5548b0d64c.tar.gz ppe42-gcc-398aae3643061632304567b00307fc5548b0d64c.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37416 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/extend.texi')
-rw-r--r-- | gcc/extend.texi | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/extend.texi b/gcc/extend.texi index 351954c3582..4f9bde73798 100644 --- a/gcc/extend.texi +++ b/gcc/extend.texi @@ -3247,12 +3247,14 @@ function as well. @findex fabsl @findex ffs @findex fputs +@findex index @findex labs @findex llabs @findex memcmp @findex memcpy @findex memset @findex printf +@findex rindex @findex sin @findex sinf @findex sinl @@ -3289,9 +3291,10 @@ and presumed not to return, but otherwise are not built in. @samp{-std=c89} or @samp{-std=c99}). Outside strict ISO C mode, the functions @code{alloca}, @code{bcmp}, -@code{bzero}, and @code{ffs} may be handled as builtins. Corresponding -versions @code{__builtin_alloca}, @code{__builtin_bcmp}, -@code{__builtin_bzero}, and @code{__builtin_ffs} are also recognized in +@code{bzero}, @code{index}, @code{rindex} and @code{ffs} may be handled +as builtins. Corresponding versions @code{__builtin_alloca}, +@code{__builtin_bcmp}, @code{__builtin_bzero}, @code{__builtin_index}, +@code{__builtin_rindex} and @code{__builtin_ffs} are also recognized in strict ISO C mode. The ISO C99 function @code{llabs} is handled as a builtin except in |