diff options
author | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2004-09-05 02:50:09 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2004-09-05 02:50:09 +0000 |
commit | 3d091dac56f97cc79cc2e9a31796219fba99764c (patch) | |
tree | 616590e443b211fdf7309d929fce3872a4ff3f15 /include/libiberty.h | |
parent | ecd466457ce9203bec0241815528533fcbee81ea (diff) | |
download | gcc-3d091dac56f97cc79cc2e9a31796219fba99764c.tar.gz |
builtin-attrs.def (ATTR_SENTINEL, [...]): New.
gcc:
* builtin-attrs.def (ATTR_SENTINEL, ATTR_SENTINEL_NOTHROW_LIST):
New.
* builtins.def (BUILT_IN_EXECL, BUILT_IN_EXECLP): Add `sentinel'
attribute.
* c-common.c (handle_sentinel_attribute, check_function_sentinel):
New functions.
(c_common_attribute_table): Add `sentinel' attribute.
(check_function_arguments): Handle `sentinel' attribute.
* doc/extend.texi: Document `sentinel' attribute.
gcc/testsuite:
* gcc.dg/format/sentinel-1.c: New test.
include:
* ansidecl.h (ATTRIBUTE_SENTINEL): Define.
* libiberty.h (concat, reconcat, concat_length, concat_copy,
concat_copy2): Use ATTRIBUTE_SENTINEL.
From-SVN: r87096
Diffstat (limited to 'include/libiberty.h')
-rw-r--r-- | include/libiberty.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/libiberty.h b/include/libiberty.h index a90b4ddcbe8..4aab80b2150 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -93,7 +93,7 @@ extern char *lrealpath PARAMS ((const char *)); the last argument of this function, to terminate the list of strings. Allocates memory using xmalloc. */ -extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC; +extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL; /* Concatenate an arbitrary number of strings. You must pass NULL as the last argument of this function, to terminate the list of @@ -102,27 +102,27 @@ extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC; pointer to be freed after the new string is created, similar to the way xrealloc works. */ -extern char *reconcat PARAMS ((char *, const char *, ...)) ATTRIBUTE_MALLOC; +extern char *reconcat PARAMS ((char *, const char *, ...)) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL; /* Determine the length of concatenating an arbitrary number of strings. You must pass NULL as the last argument of this function, to terminate the list of strings. */ -extern unsigned long concat_length PARAMS ((const char *, ...)); +extern unsigned long concat_length PARAMS ((const char *, ...)) ATTRIBUTE_SENTINEL; /* Concatenate an arbitrary number of strings into a SUPPLIED area of memory. You must pass NULL as the last argument of this function, to terminate the list of strings. The supplied memory is assumed to be large enough. */ -extern char *concat_copy PARAMS ((char *, const char *, ...)); +extern char *concat_copy PARAMS ((char *, const char *, ...)) ATTRIBUTE_SENTINEL; /* Concatenate an arbitrary number of strings into a GLOBAL area of memory. You must pass NULL as the last argument of this function, to terminate the list of strings. The supplied memory is assumed to be large enough. */ -extern char *concat_copy2 PARAMS ((const char *, ...)); +extern char *concat_copy2 PARAMS ((const char *, ...)) ATTRIBUTE_SENTINEL; /* This is the global area used by concat_copy2. */ |