diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-11 13:33:21 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-11 13:33:21 +0000 |
commit | d89269e279ce6dd50254a3384d66431b5daac662 (patch) | |
tree | 020a93024a031b8f28f39014d70c6bedbca974d0 /gcc/builtin-attrs.def | |
parent | c843a183cfdf952d725d0e07d005038680ae58db (diff) | |
download | gcc-d89269e279ce6dd50254a3384d66431b5daac662.tar.gz |
* builtin-attrs.def (ATTR_NONNULL_LIST, ATTR_NOTHROW_NONNULL,
ATTR_CONST_NOTHROW_NONNULL, ATTR_PURE_NOTHROW_NONNULL,
ATTR_MALLOC_NOTHROW_NONNULL): New "nonnull" attribute lists which
are non-specific regarding the nonnull parameter positions.
(ATTR_NONNULL_1_2, ATTR_NONNULL_1_4, ATTR_NOTHROW_NONNULL_1_2,
ATTR_NOTHROW_NONNULL_1_4, ATTR_CONST_NOTHROW_NONNULL_1,
ATTR_PURE_NOTHROW_NONNULL_1, ATTR_PURE_NOTHROW_NONNULL_1_2,
ATTR_MALLOC_NOTHROW_NONNULL_1): Delete.
* builtins.def: Use the non-specific "nonnull" attibute lists.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96298 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtin-attrs.def')
-rw-r--r-- | gcc/builtin-attrs.def | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/gcc/builtin-attrs.def b/gcc/builtin-attrs.def index 8b08e7b0f1d..19a23b678c3 100644 --- a/gcc/builtin-attrs.def +++ b/gcc/builtin-attrs.def @@ -101,40 +101,36 @@ DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_LIST, ATTR_MALLOC, \ DEF_ATTR_TREE_LIST (ATTR_SENTINEL_NOTHROW_LIST, ATTR_SENTINEL, \ ATTR_NULL, ATTR_NOTHROW_LIST) +/* Functions whose pointer parameter(s) are all nonnull. */ +DEF_ATTR_TREE_LIST (ATTR_NONNULL_LIST, ATTR_NONNULL, ATTR_NULL, ATTR_NULL) +/* Functions whose first parameter is a nonnull pointer. */ DEF_ATTR_TREE_LIST (ATTR_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, ATTR_NULL) +/* Functions whose second parameter is a nonnull pointer. */ DEF_ATTR_TREE_LIST (ATTR_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, ATTR_NULL) -/* Functions whose first and second parameters are nonnull pointers. */ -DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_2, ATTR_NONNULL, ATTR_LIST_2, \ - ATTR_NONNULL_1) -/* Functions whose first and fourth parameters are nonnull pointers. */ -DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_4, ATTR_NONNULL, ATTR_LIST_4, \ - ATTR_NONNULL_1) +/* Nothrow functions with the sentinel(1) attribute. */ DEF_ATTR_TREE_LIST (ATTR_NOTHROW_SENTINEL_1, ATTR_SENTINEL, ATTR_LIST_1, \ ATTR_NOTHROW_LIST) +/* Nothrow functions whose pointer parameter(s) are all nonnull. */ +DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL, ATTR_NONNULL, ATTR_NULL, \ + ATTR_NOTHROW_LIST) +/* Nothrow functions whose first parameter is a nonnull pointer. */ DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, \ ATTR_NOTHROW_LIST) +/* Nothrow functions whose second parameter is a nonnull pointer. */ DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, \ ATTR_NOTHROW_LIST) +/* Nothrow functions whose third parameter is a nonnull pointer. */ DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_3, ATTR_NONNULL, ATTR_LIST_3, \ ATTR_NOTHROW_LIST) -/* Nothrow functions whose first and second parameters are nonnull pointers. */ -DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_2, ATTR_NONNULL, ATTR_LIST_2, \ - ATTR_NOTHROW_NONNULL_1) -/* Nothrow functions whose first and fourth parameters are nonnull pointers. */ -DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_4, ATTR_NONNULL, ATTR_LIST_4, \ - ATTR_NOTHROW_NONNULL_1) -/* Nothrow const functions whose first parameter is a nonnull pointer. */ -DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_NONNULL_1, ATTR_CONST, ATTR_NULL, \ - ATTR_NOTHROW_NONNULL_1) -/* Nothrow pure functions whose first parameter is a nonnull pointer. */ -DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL_1, ATTR_PURE, ATTR_NULL, \ - ATTR_NOTHROW_NONNULL_1) -/* Nothrow pure functions whose first and second parameters are nonnull pointers. */ -DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL_1_2, ATTR_PURE, ATTR_NULL, \ - ATTR_NOTHROW_NONNULL_1_2) -/* Nothrow malloc functions whose first parameter is a nonnull pointer. */ -DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_NONNULL_1, ATTR_MALLOC, ATTR_NULL, \ - ATTR_NOTHROW_NONNULL_1) +/* Nothrow const functions whose pointer parameter(s) are all nonnull. */ +DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_NONNULL, ATTR_CONST, ATTR_NULL, \ + ATTR_NOTHROW_NONNULL) +/* Nothrow pure functions whose pointer parameter(s) are all nonnull. */ +DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL, ATTR_PURE, ATTR_NULL, \ + ATTR_NOTHROW_NONNULL) +/* Nothrow malloc functions whose pointer parameter(s) are all nonnull. */ +DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_NONNULL, ATTR_MALLOC, ATTR_NULL, \ + ATTR_NOTHROW_NONNULL) /* Construct a tree for a format attribute. */ #define DEF_FORMAT_ATTRIBUTE(TYPE, FA, VALUES) \ |