builtin-attrs.def (ATTR_SENTINEL, [...]): New.
authorKaveh Ghazi <ghazi@gcc.gnu.org>
Sun, 5 Sep 2004 02:50:09 +0000 (02:50 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sun, 5 Sep 2004 02:50:09 +0000 (02:50 +0000)
commit3d091dac56f97cc79cc2e9a31796219fba99764c
tree616590e443b211fdf7309d929fce3872a4ff3f15
parentecd466457ce9203bec0241815528533fcbee81ea
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
gcc/ChangeLog
gcc/builtin-attrs.def
gcc/builtins.def
gcc/c-common.c
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format/sentinel-1.c [new file with mode: 0644]
include/ChangeLog
include/ansidecl.h
include/libiberty.h