summaryrefslogtreecommitdiff
path: root/gcc/builtins.def
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2000-11-27 05:00:06 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2000-11-27 05:00:06 +0000
commitda9e9f0862f6ba1c843d2241329a368b509a450b (patch)
tree415bfe1eb788d734afb9ccfea25ebbb397482eff /gcc/builtins.def
parent231db5f4ec6703b6b9a931fa37c0eab18d4d49d8 (diff)
downloadgcc-da9e9f0862f6ba1c843d2241329a368b509a450b.tar.gz
builtins.c (expand_builtin_strncmp, [...]): New functions.
* builtins.c (expand_builtin_strncmp, expand_builtin_strncpy): New functions. (expand_builtin): Handle BUILT_IN_STRNCPY and BUILT_IN_STRNCMP. * builtins.def (BUILT_IN_STRNCPY, BUILT_IN_STRNCMP): New entries. * c-common.c (c_common_nodes_and_builtins): Declare builtin strncpy and strncmp. * extend.texi (strncmp, strncpy): Document new builtins. testsuite: * gcc.c-torture/execute/string-opt-7.c: New test. * gcc.c-torture/execute/string-opt-8.c: Likewise. From-SVN: r37777
Diffstat (limited to 'gcc/builtins.def')
-rw-r--r--gcc/builtins.def2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/builtins.def b/gcc/builtins.def
index 1920282b280..ec4325284a3 100644
--- a/gcc/builtins.def
+++ b/gcc/builtins.def
@@ -39,7 +39,9 @@ DEF_BUILTIN(BUILT_IN_BCMP)
DEF_BUILTIN(BUILT_IN_INDEX)
DEF_BUILTIN(BUILT_IN_RINDEX)
DEF_BUILTIN(BUILT_IN_STRCPY)
+DEF_BUILTIN(BUILT_IN_STRNCPY)
DEF_BUILTIN(BUILT_IN_STRCMP)
+DEF_BUILTIN(BUILT_IN_STRNCMP)
DEF_BUILTIN(BUILT_IN_STRLEN)
DEF_BUILTIN(BUILT_IN_STRSTR)
DEF_BUILTIN(BUILT_IN_STRPBRK)