From e905ac64c06a8a90b9303d66078484723b40fb4c Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Sun, 3 Apr 2005 22:08:12 +0000 Subject: builtins.def (BUILT_IN_STPNCPY, [...]): New. * builtins.def (BUILT_IN_STPNCPY, BUILT_IN_STRCASECMP, BUILT_IN_STRNCASECMP): New. * doc/extend.texi: Document stpncpy, strcasecmp, strncasecmp and strndup. testsuite: * gcc.dg/nonnull-3.c: Also test __builtin_stpncpy, __builtin_strcasecmp and __builtin_strncasecmp. From-SVN: r97498 --- gcc/testsuite/gcc.dg/nonnull-3.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/testsuite/gcc.dg/nonnull-3.c') diff --git a/gcc/testsuite/gcc.dg/nonnull-3.c b/gcc/testsuite/gcc.dg/nonnull-3.c index e8725cf..040248c 100644 --- a/gcc/testsuite/gcc.dg/nonnull-3.c +++ b/gcc/testsuite/gcc.dg/nonnull-3.c @@ -33,10 +33,16 @@ foo (void *p, char *s) __builtin_strncat (s, NULL, 16); /* { dg-warning "null" "null pointer check" } */ __builtin_stpcpy (NULL, s); /* { dg-warning "null" "null pointer check" } */ __builtin_stpcpy (s, NULL); /* { dg-warning "null" "null pointer check" } */ + __builtin_stpncpy (NULL, s, 16); /* { dg-warning "null" "null pointer check" } */ + __builtin_stpncpy (s, NULL, 16); /* { dg-warning "null" "null pointer check" } */ __builtin_strcpy (NULL, s); /* { dg-warning "null" "null pointer check" } */ __builtin_strcpy (s, NULL); /* { dg-warning "null" "null pointer check" } */ __builtin_strncpy (NULL, s, 16); /* { dg-warning "null" "null pointer check" } */ __builtin_strncpy (s, NULL, 16); /* { dg-warning "null" "null pointer check" } */ + __builtin_strcasecmp (NULL, s); /* { dg-warning "null" "null pointer check" } */ + __builtin_strcasecmp (s, NULL); /* { dg-warning "null" "null pointer check" } */ + __builtin_strncasecmp (NULL, s, 16); /* { dg-warning "null" "null pointer check" } */ + __builtin_strncasecmp (s, NULL, 16); /* { dg-warning "null" "null pointer check" } */ __builtin_strcmp (NULL, s); /* { dg-warning "null" "null pointer check" } */ __builtin_strcmp (s, NULL); /* { dg-warning "null" "null pointer check" } */ __builtin_strncmp (NULL, s, 16); /* { dg-warning "null" "null pointer check" } */ -- cgit v1.1