annotate gcc/builtin-attrs.def @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
kono
parents: 14
diff changeset
1 /* Copyright (C) 2001-2017 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 Contributed by Joseph Myers <jsm28@cam.ac.uk>.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it under
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 the terms of the GNU General Public License as published by the Free
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 Software Foundation; either version 3, or (at your option) any later
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 /* This header provides a declarative way of describing the attributes
16
kono
parents: 14
diff changeset
21 that are applied to some built-in functions by default. Attributes
kono
parents: 14
diff changeset
22 that are meant to be used by user-defined functions but aren't used
kono
parents: 14
diff changeset
23 by any built-ins, or attributes that apply to types or variables
kono
parents: 14
diff changeset
24 but not to functions need not and should not be defined here.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 Before including this header, you must define the following macros.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 In each case where there is an ENUM, it is an identifier used to
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 reference the tree in subsequent definitions.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 DEF_ATTR_NULL_TREE (ENUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 Constructs a NULL_TREE.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 DEF_ATTR_INT (ENUM, VALUE)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 Constructs an INTEGER_CST with value VALUE (an integer representable
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 in HOST_WIDE_INT).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 DEF_ATTR_IDENT (ENUM, STRING)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 Constructs an IDENTIFIER_NODE for STRING.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 DEF_ATTR_TREE_LIST (ENUM, PURPOSE, VALUE, CHAIN)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 Constructs a TREE_LIST with given PURPOSE, VALUE and CHAIN (given
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 as previous ENUM names). */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 DEF_ATTR_NULL_TREE (ATTR_NULL)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 /* Construct a tree for a given integer and a list containing it. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 #define DEF_ATTR_FOR_INT(VALUE) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 DEF_ATTR_INT (ATTR_##VALUE, VALUE) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 DEF_ATTR_TREE_LIST (ATTR_LIST_##VALUE, ATTR_NULL, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 ATTR_##VALUE, ATTR_NULL)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 DEF_ATTR_FOR_INT (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 DEF_ATTR_FOR_INT (1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 DEF_ATTR_FOR_INT (2)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 DEF_ATTR_FOR_INT (3)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 DEF_ATTR_FOR_INT (4)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 DEF_ATTR_FOR_INT (5)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 DEF_ATTR_FOR_INT (6)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 #undef DEF_ATTR_FOR_INT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63
16
kono
parents: 14
diff changeset
64 /* Construct a tree for a given string and a list containing it. */
kono
parents: 14
diff changeset
65 #define DEF_ATTR_FOR_STRING(ENUM, VALUE) \
kono
parents: 14
diff changeset
66 DEF_ATTR_STRING (ATTR_##ENUM, VALUE) \
kono
parents: 14
diff changeset
67 DEF_ATTR_TREE_LIST (ATTR_LIST_##ENUM, ATTR_NULL, \
kono
parents: 14
diff changeset
68 ATTR_##ENUM, ATTR_NULL)
kono
parents: 14
diff changeset
69 DEF_ATTR_FOR_STRING (STR1, "1")
kono
parents: 14
diff changeset
70 #undef DEF_ATTR_FOR_STRING
kono
parents: 14
diff changeset
71
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 /* Construct a tree for a list of two integers. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 #define DEF_LIST_INT_INT(VALUE1, VALUE2) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 DEF_ATTR_TREE_LIST (ATTR_LIST_##VALUE1##_##VALUE2, ATTR_NULL, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 ATTR_##VALUE1, ATTR_LIST_##VALUE2)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 DEF_LIST_INT_INT (1,0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 DEF_LIST_INT_INT (1,2)
16
kono
parents: 14
diff changeset
78 DEF_LIST_INT_INT (1,3)
kono
parents: 14
diff changeset
79 DEF_LIST_INT_INT (1,4)
kono
parents: 14
diff changeset
80 DEF_LIST_INT_INT (1,5)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 DEF_LIST_INT_INT (2,0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 DEF_LIST_INT_INT (2,3)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 DEF_LIST_INT_INT (3,0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 DEF_LIST_INT_INT (3,4)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 DEF_LIST_INT_INT (4,0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 DEF_LIST_INT_INT (4,5)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 DEF_LIST_INT_INT (5,0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 DEF_LIST_INT_INT (5,6)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 #undef DEF_LIST_INT_INT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90
16
kono
parents: 14
diff changeset
91 /* Construct trees for identifiers used in built-in function attributes.
kono
parents: 14
diff changeset
92 The construction contributes to startup costs so only attributes that
kono
parents: 14
diff changeset
93 are used to define built-ins should be defined here. */
kono
parents: 14
diff changeset
94 DEF_ATTR_IDENT (ATTR_ALLOC_SIZE, "alloc_size")
kono
parents: 14
diff changeset
95 DEF_ATTR_IDENT (ATTR_COLD, "cold")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 DEF_ATTR_IDENT (ATTR_CONST, "const")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 DEF_ATTR_IDENT (ATTR_FORMAT, "format")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 DEF_ATTR_IDENT (ATTR_FORMAT_ARG, "format_arg")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 DEF_ATTR_IDENT (ATTR_MALLOC, "malloc")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 DEF_ATTR_IDENT (ATTR_NONNULL, "nonnull")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 DEF_ATTR_IDENT (ATTR_NORETURN, "noreturn")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 DEF_ATTR_IDENT (ATTR_NOTHROW, "nothrow")
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
103 DEF_ATTR_IDENT (ATTR_LEAF, "leaf")
16
kono
parents: 14
diff changeset
104 DEF_ATTR_IDENT (ATTR_FNSPEC, "fn spec")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 DEF_ATTR_IDENT (ATTR_PRINTF, "printf")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 DEF_ATTR_IDENT (ATTR_ASM_FPRINTF, "asm_fprintf")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 DEF_ATTR_IDENT (ATTR_GCC_DIAG, "gcc_diag")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 DEF_ATTR_IDENT (ATTR_GCC_CDIAG, "gcc_cdiag")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 DEF_ATTR_IDENT (ATTR_GCC_CXXDIAG, "gcc_cxxdiag")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 DEF_ATTR_IDENT (ATTR_PURE, "pure")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 DEF_ATTR_IDENT (ATTR_NOVOPS, "no vops")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 DEF_ATTR_IDENT (ATTR_SCANF, "scanf")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 DEF_ATTR_IDENT (ATTR_SENTINEL, "sentinel")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 DEF_ATTR_IDENT (ATTR_STRFMON, "strfmon")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 DEF_ATTR_IDENT (ATTR_STRFTIME, "strftime")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 DEF_ATTR_IDENT (ATTR_TYPEGENERIC, "type generic")
16
kono
parents: 14
diff changeset
117 DEF_ATTR_IDENT (ATTR_TM_REGPARM, "*tm regparm")
kono
parents: 14
diff changeset
118 DEF_ATTR_IDENT (ATTR_TM_TMPURE, "transaction_pure")
kono
parents: 14
diff changeset
119 DEF_ATTR_IDENT (ATTR_RETURNS_TWICE, "returns_twice")
kono
parents: 14
diff changeset
120 DEF_ATTR_IDENT (ATTR_RETURNS_NONNULL, "returns_nonnull")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 DEF_ATTR_TREE_LIST (ATTR_NOVOPS_LIST, ATTR_NOVOPS, ATTR_NULL, ATTR_NULL)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
124 DEF_ATTR_TREE_LIST (ATTR_NOVOPS_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOVOPS_LIST)
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
125
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
126 DEF_ATTR_TREE_LIST (ATTR_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NULL)
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
127
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LIST, ATTR_NOTHROW, ATTR_NULL, ATTR_NULL)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
130 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOTHROW_LIST)
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
131
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LIST, ATTR_CONST, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 ATTR_NULL, ATTR_NOTHROW_LIST)
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
134 DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LEAF_LIST, ATTR_CONST, \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
135 ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_LIST, ATTR_PURE, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 ATTR_NULL, ATTR_NOTHROW_LIST)
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
138 DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_LEAF_LIST, ATTR_PURE, \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
139 ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LIST, ATTR_NORETURN, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 ATTR_NULL, ATTR_NOTHROW_LIST)
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
142 DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LEAF_LIST, ATTR_NORETURN,\
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
143 ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
16
kono
parents: 14
diff changeset
144 DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST, ATTR_COLD,\
kono
parents: 14
diff changeset
145 ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
146 DEF_ATTR_TREE_LIST (ATTR_RT_NOTHROW_LEAF_LIST, ATTR_RETURNS_TWICE,\
kono
parents: 14
diff changeset
147 ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
148 DEF_ATTR_TREE_LIST (ATTR_COLD_NOTHROW_LEAF_LIST, ATTR_COLD,\
kono
parents: 14
diff changeset
149 ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
150 DEF_ATTR_TREE_LIST (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST, ATTR_COLD,\
kono
parents: 14
diff changeset
151 ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
152 DEF_ATTR_TREE_LIST (ATTR_CONST_NORETURN_NOTHROW_LEAF_LIST, ATTR_CONST,\
kono
parents: 14
diff changeset
153 ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
154 DEF_ATTR_TREE_LIST (ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST, ATTR_COLD,\
kono
parents: 14
diff changeset
155 ATTR_NULL, ATTR_CONST_NORETURN_NOTHROW_LEAF_LIST)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_LIST, ATTR_MALLOC, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 ATTR_NULL, ATTR_NOTHROW_LIST)
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
158 DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_LEAF_LIST, ATTR_MALLOC, \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
159 ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 DEF_ATTR_TREE_LIST (ATTR_SENTINEL_NOTHROW_LIST, ATTR_SENTINEL, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 ATTR_NULL, ATTR_NOTHROW_LIST)
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
162 DEF_ATTR_TREE_LIST (ATTR_SENTINEL_NOTHROW_LEAF_LIST, ATTR_SENTINEL, \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
163 ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
16
kono
parents: 14
diff changeset
164 DEF_ATTR_TREE_LIST (ATTR_COLD_CONST_NORETURN_NOTHROW_LEAF_LIST, ATTR_CONST,\
kono
parents: 14
diff changeset
165 ATTR_NULL, ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
166
kono
parents: 14
diff changeset
167 /* Allocation functions like malloc and realloc whose first argument
kono
parents: 14
diff changeset
168 with _SIZE_1, or second argument with _SIZE_2, specifies the size
kono
parents: 14
diff changeset
169 of the allocated object. */
kono
parents: 14
diff changeset
170 DEF_ATTR_TREE_LIST (ATTR_MALLOC_SIZE_1_NOTHROW_LIST, ATTR_ALLOC_SIZE, \
kono
parents: 14
diff changeset
171 ATTR_LIST_1, ATTR_MALLOC_NOTHROW_LIST)
kono
parents: 14
diff changeset
172 DEF_ATTR_TREE_LIST (ATTR_ALLOC_SIZE_2_NOTHROW_LIST, ATTR_ALLOC_SIZE, \
kono
parents: 14
diff changeset
173 ATTR_LIST_2, ATTR_MALLOC_NOTHROW_LIST)
kono
parents: 14
diff changeset
174 DEF_ATTR_TREE_LIST (ATTR_MALLOC_SIZE_1_NOTHROW_LEAF_LIST, ATTR_ALLOC_SIZE, \
kono
parents: 14
diff changeset
175 ATTR_LIST_1, ATTR_MALLOC_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
176 /* Alloca is just like malloc except that it never returns null. */
kono
parents: 14
diff changeset
177 DEF_ATTR_TREE_LIST (ATTR_ALLOCA_SIZE_1_NOTHROW_LEAF_LIST, ATTR_RETURNS_NONNULL,
kono
parents: 14
diff changeset
178 ATTR_NULL, ATTR_MALLOC_SIZE_1_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
179
kono
parents: 14
diff changeset
180 /* Allocation functions like calloc the product of whose first two arguments
kono
parents: 14
diff changeset
181 specifies the size of the allocated object. */
kono
parents: 14
diff changeset
182 DEF_ATTR_TREE_LIST (ATTR_MALLOC_SIZE_1_2_NOTHROW_LEAF_LIST, ATTR_ALLOC_SIZE, \
kono
parents: 14
diff changeset
183 ATTR_LIST_1_2, ATTR_MALLOC_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
184
kono
parents: 14
diff changeset
185 /* Allocation functions like realloc whose second argument specifies
kono
parents: 14
diff changeset
186 the size of the allocated object. */
kono
parents: 14
diff changeset
187 DEF_ATTR_TREE_LIST (ATTR_ALLOC_SIZE_2_NOTHROW_LEAF_LIST, ATTR_ALLOC_SIZE, \
kono
parents: 14
diff changeset
188 ATTR_LIST_2, ATTR_NOTHROW_LEAF_LIST)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 /* Functions whose pointer parameter(s) are all nonnull. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 DEF_ATTR_TREE_LIST (ATTR_NONNULL_LIST, ATTR_NONNULL, ATTR_NULL, ATTR_NULL)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 /* Functions whose first parameter is a nonnull pointer. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 DEF_ATTR_TREE_LIST (ATTR_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, ATTR_NULL)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
194 /* Functions whose second parameter is a nonnull pointer. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 DEF_ATTR_TREE_LIST (ATTR_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, ATTR_NULL)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
196 /* Functions whose third parameter is a nonnull pointer. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 DEF_ATTR_TREE_LIST (ATTR_NONNULL_3, ATTR_NONNULL, ATTR_LIST_3, ATTR_NULL)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 /* Nothrow functions with the sentinel(1) attribute. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_SENTINEL_1, ATTR_SENTINEL, ATTR_LIST_1, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 ATTR_NOTHROW_LIST)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 /* Nothrow functions whose pointer parameter(s) are all nonnull. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL, ATTR_NONNULL, ATTR_NULL, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 ATTR_NOTHROW_LIST)
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
204 /* Nothrow leaf functions whose pointer parameter(s) are all nonnull. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
205 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_LEAF, ATTR_NONNULL, ATTR_NULL, \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
206 ATTR_NOTHROW_LEAF_LIST)
16
kono
parents: 14
diff changeset
207 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOTHROW_NONNULL_LEAF)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 /* Nothrow functions whose first parameter is a nonnull pointer. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 ATTR_NOTHROW_LIST)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 /* Nothrow functions whose second parameter is a nonnull pointer. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 ATTR_NOTHROW_LIST)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 /* Nothrow functions whose third parameter is a nonnull pointer. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_3, ATTR_NONNULL, ATTR_LIST_3, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 ATTR_NOTHROW_LIST)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 /* Nothrow functions whose fourth parameter is a nonnull pointer. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_4, ATTR_NONNULL, ATTR_LIST_4, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 ATTR_NOTHROW_LIST)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
220 /* Nothrow functions whose fifth parameter is a nonnull pointer. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_5, ATTR_NONNULL, ATTR_LIST_5, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 ATTR_NOTHROW_LIST)
16
kono
parents: 14
diff changeset
223
kono
parents: 14
diff changeset
224 /* Same as ATTR_NONNULL_1. */
kono
parents: 14
diff changeset
225 DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_1, ATTR_NONNULL, ATTR_LIST_1, ATTR_NULL)
kono
parents: 14
diff changeset
226 /* Functions like {v,}fprintf whose first and second parameters are
kono
parents: 14
diff changeset
227 nonnull pointers. As cancellation points the functions are not
kono
parents: 14
diff changeset
228 nothrow. */
kono
parents: 14
diff changeset
229 DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_2, ATTR_NONNULL, ATTR_LIST_1_2, ATTR_NULL)
kono
parents: 14
diff changeset
230 /* The following don't have {v,}fprintf forms. They exist only to
kono
parents: 14
diff changeset
231 make it possible to declare {v,}{f,s}printf attributes using
kono
parents: 14
diff changeset
232 the same macro. */
kono
parents: 14
diff changeset
233 DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_3, ATTR_NONNULL, ATTR_LIST_1_3, ATTR_NULL)
kono
parents: 14
diff changeset
234 DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_4, ATTR_NONNULL, ATTR_LIST_1_4, ATTR_NULL)
kono
parents: 14
diff changeset
235 DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_5, ATTR_NONNULL, ATTR_LIST_1_5, ATTR_NULL)
kono
parents: 14
diff changeset
236
kono
parents: 14
diff changeset
237 /* Same as ATTR_NOTHROW_NONNULL_1. */
kono
parents: 14
diff changeset
238 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_1, ATTR_NONNULL, ATTR_LIST_1,
kono
parents: 14
diff changeset
239 ATTR_NOTHROW_LIST)
kono
parents: 14
diff changeset
240 /* Nothrow functions like {v,}sprintf whose first and second parameters
kono
parents: 14
diff changeset
241 are nonnull pointers. */
kono
parents: 14
diff changeset
242 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_2, ATTR_NONNULL, ATTR_LIST_1_2, \
kono
parents: 14
diff changeset
243 ATTR_NOTHROW_LIST)
kono
parents: 14
diff changeset
244 /* Nothrow functions like {v,}snprintf whose first and third parameters
kono
parents: 14
diff changeset
245 are nonnull pointers. */
kono
parents: 14
diff changeset
246 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_3, ATTR_NONNULL, ATTR_LIST_1_3, \
kono
parents: 14
diff changeset
247 ATTR_NOTHROW_LIST)
kono
parents: 14
diff changeset
248 /* Nothrow functions like {v,}sprintf_chk whose first and fourth parameters
kono
parents: 14
diff changeset
249 are nonnull pointers. */
kono
parents: 14
diff changeset
250 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_4, ATTR_NONNULL, ATTR_LIST_1_4, \
kono
parents: 14
diff changeset
251 ATTR_NOTHROW_LIST)
kono
parents: 14
diff changeset
252 /* Nothrow functions like {v,}snprintf_chk whose first and fifth parameters
kono
parents: 14
diff changeset
253 are nonnull pointers. */
kono
parents: 14
diff changeset
254 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_5, ATTR_NONNULL, ATTR_LIST_1_5, \
kono
parents: 14
diff changeset
255 ATTR_NOTHROW_LIST)
kono
parents: 14
diff changeset
256
kono
parents: 14
diff changeset
257 /* Nothrow leaf functions which are type-generic. */
kono
parents: 14
diff changeset
258 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_TYPEGENERIC_LEAF, ATTR_TYPEGENERIC, ATTR_NULL, \
kono
parents: 14
diff changeset
259 ATTR_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
260 /* Nothrow nonnull leaf functions that are type-generic. */
kono
parents: 14
diff changeset
261 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_TYPEGENERIC_LEAF,
kono
parents: 14
diff changeset
262 ATTR_TYPEGENERIC, ATTR_NULL,
kono
parents: 14
diff changeset
263 ATTR_NOTHROW_NONNULL_LEAF)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
264 /* Nothrow const functions whose pointer parameter(s) are all nonnull. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_NONNULL, ATTR_CONST, ATTR_NULL, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
266 ATTR_NOTHROW_NONNULL)
16
kono
parents: 14
diff changeset
267 /* Nothrow leaf functions whose pointer parameter(s) are all nonnull,
kono
parents: 14
diff changeset
268 and which return their first argument. */
kono
parents: 14
diff changeset
269 DEF_ATTR_TREE_LIST (ATTR_RET1_NOTHROW_NONNULL_LEAF, ATTR_FNSPEC, ATTR_LIST_STR1, \
kono
parents: 14
diff changeset
270 ATTR_NOTHROW_NONNULL_LEAF)
kono
parents: 14
diff changeset
271 /* Nothrow leaf functions whose pointer parameter(s) are all nonnull,
kono
parents: 14
diff changeset
272 and return value is also nonnull. */
kono
parents: 14
diff changeset
273 DEF_ATTR_TREE_LIST (ATTR_RETNONNULL_NOTHROW_LEAF, ATTR_RETURNS_NONNULL, ATTR_NULL, \
kono
parents: 14
diff changeset
274 ATTR_NOTHROW_NONNULL_LEAF)
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
275 /* Nothrow const leaf functions whose pointer parameter(s) are all nonnull. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
276 DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_NONNULL_LEAF, ATTR_CONST, ATTR_NULL, \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
277 ATTR_NOTHROW_NONNULL_LEAF)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 /* Nothrow const functions which are type-generic. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_TYPEGENERIC, ATTR_TYPEGENERIC, ATTR_NULL, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
280 ATTR_CONST_NOTHROW_LIST)
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
281 /* Nothrow const leaf functions which are type-generic. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
282 DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_TYPEGENERIC_LEAF, ATTR_TYPEGENERIC, ATTR_NULL, \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
283 ATTR_CONST_NOTHROW_LEAF_LIST)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 /* Nothrow pure functions whose pointer parameter(s) are all nonnull. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
285 DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL, ATTR_PURE, ATTR_NULL, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
286 ATTR_NOTHROW_NONNULL)
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
287 /* Nothrow pure leaf functions whose pointer parameter(s) are all nonnull. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
288 DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL_LEAF, ATTR_PURE, ATTR_NULL, \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
289 ATTR_NOTHROW_NONNULL_LEAF)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
290 /* Nothrow malloc functions whose pointer parameter(s) are all nonnull. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_NONNULL, ATTR_MALLOC, ATTR_NULL, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
292 ATTR_NOTHROW_NONNULL)
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
293 /* Nothrow malloc leaf functions whose pointer parameter(s) are all nonnull. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
294 DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_NONNULL_LEAF, ATTR_MALLOC, ATTR_NULL, \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
295 ATTR_NOTHROW_NONNULL_LEAF)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
296
16
kono
parents: 14
diff changeset
297 /* Construct a tree for the format attribute (and implicitly nonnull). */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 #define DEF_FORMAT_ATTRIBUTE(TYPE, FA, VALUES) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
299 DEF_ATTR_TREE_LIST (ATTR_##TYPE##_##VALUES, ATTR_NULL, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
300 ATTR_##TYPE, ATTR_LIST_##VALUES) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_##VALUES, ATTR_FORMAT, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 ATTR_##TYPE##_##VALUES, ATTR_NONNULL_##FA)
16
kono
parents: 14
diff changeset
303
kono
parents: 14
diff changeset
304 /* Construct a tree for the format and nothrow attributes (format
kono
parents: 14
diff changeset
305 implies nonnull). */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
306 #define DEF_FORMAT_ATTRIBUTE_NOTHROW(TYPE, FA, VALUES) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
307 DEF_ATTR_TREE_LIST (ATTR_##TYPE##_##VALUES, ATTR_NULL, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
308 ATTR_##TYPE, ATTR_LIST_##VALUES) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_NOTHROW_##VALUES, ATTR_FORMAT,\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
310 ATTR_##TYPE##_##VALUES, ATTR_NOTHROW_NONNULL_##FA)
16
kono
parents: 14
diff changeset
311
kono
parents: 14
diff changeset
312 /* Construct one tree for the format attribute and another for the format
kono
parents: 14
diff changeset
313 and nothrow attributes (in both cases format implies nonnull). */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 #define DEF_FORMAT_ATTRIBUTE_BOTH(TYPE, FA, VALUES) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
315 DEF_ATTR_TREE_LIST (ATTR_##TYPE##_##VALUES, ATTR_NULL, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 ATTR_##TYPE, ATTR_LIST_##VALUES) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_##VALUES, ATTR_FORMAT, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 ATTR_##TYPE##_##VALUES, ATTR_NONNULL_##FA) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_NOTHROW_##VALUES, ATTR_FORMAT,\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 ATTR_##TYPE##_##VALUES, ATTR_NOTHROW_NONNULL_##FA)
16
kono
parents: 14
diff changeset
321
kono
parents: 14
diff changeset
322 /* Construct a pair of trees for the nonnull attribute for the first
kono
parents: 14
diff changeset
323 argument, plus format printf attribute (format implies nonnull):
kono
parents: 14
diff changeset
324 the first ordinary and the second nothrow. */
kono
parents: 14
diff changeset
325 #define DEF_FORMAT_ATTRIBUTE_NONNULL(TYPE, FA, VALUES) \
kono
parents: 14
diff changeset
326 DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_FORMAT_##TYPE##_##VALUES, \
kono
parents: 14
diff changeset
327 ATTR_FORMAT, ATTR_##TYPE##_##VALUES, \
kono
parents: 14
diff changeset
328 ATTR_NONNULL_1_##FA) \
kono
parents: 14
diff changeset
329 DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_FORMAT_##TYPE##_##VALUES, \
kono
parents: 14
diff changeset
330 ATTR_FORMAT, ATTR_##TYPE##_##VALUES, \
kono
parents: 14
diff changeset
331 ATTR_NOTHROW_NONNULL_1_##FA)
kono
parents: 14
diff changeset
332
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
333 DEF_FORMAT_ATTRIBUTE(PRINTF,1,1_0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
334 DEF_FORMAT_ATTRIBUTE(PRINTF,1,1_2)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,2,2_0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
336 DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,2,2_3)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
337 DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,3,3_0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
338 DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,3,3_4)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
339 DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,4,4_0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,4,4_5)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,5,5_0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
342 DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,5,5_6)
16
kono
parents: 14
diff changeset
343
kono
parents: 14
diff changeset
344 /* Attributes for fprintf(f, f, va). */
kono
parents: 14
diff changeset
345 DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,1,1_2)
kono
parents: 14
diff changeset
346 /* Attributes for v{f,s}printf(d, f, va). vsprintf is nothrow, vfprintf
kono
parents: 14
diff changeset
347 is not. */
kono
parents: 14
diff changeset
348 DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,2,2_0)
kono
parents: 14
diff changeset
349 /* Attributes for {f,s}printf(d, f, ...). sprintf is nothrow, fprintf
kono
parents: 14
diff changeset
350 is not. */
kono
parents: 14
diff changeset
351 DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,2,2_3)
kono
parents: 14
diff changeset
352 /* Attributes for vprintf_chk. */
kono
parents: 14
diff changeset
353 DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,3,3_0)
kono
parents: 14
diff changeset
354 /* Attributes for printf_chk. */
kono
parents: 14
diff changeset
355 DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,3,3_4)
kono
parents: 14
diff changeset
356 /* Attributes for v{f,s}printf_chk(d, t, bos, f, va). vsprintf_chk is
kono
parents: 14
diff changeset
357 nothrow, vfprintf_chk is not. */
kono
parents: 14
diff changeset
358 DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,4,4_0)
kono
parents: 14
diff changeset
359 /* Attributes for {f,s}printf_chk(d, t, bos, f, ...). sprintf_chk is
kono
parents: 14
diff changeset
360 nothrow, fprintf_chk is not. */
kono
parents: 14
diff changeset
361 DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,4,4_5)
kono
parents: 14
diff changeset
362
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
363 DEF_FORMAT_ATTRIBUTE(SCANF,1,1_0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
364 DEF_FORMAT_ATTRIBUTE(SCANF,1,1_2)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
365 DEF_FORMAT_ATTRIBUTE_BOTH(SCANF,2,2_0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
366 DEF_FORMAT_ATTRIBUTE_BOTH(SCANF,2,2_3)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 DEF_FORMAT_ATTRIBUTE_NOTHROW(STRFTIME,3,3_0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
368 DEF_FORMAT_ATTRIBUTE_NOTHROW(STRFMON,3,3_4)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
369 #undef DEF_FORMAT_ATTRIBUTE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
370 #undef DEF_FORMAT_ATTRIBUTE_NOTHROW
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
371 #undef DEF_FORMAT_ATTRIBUTE_BOTH
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
372
16
kono
parents: 14
diff changeset
373 /* Transactional memory variants of the above. */
kono
parents: 14
diff changeset
374
kono
parents: 14
diff changeset
375 DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_LIST,
kono
parents: 14
diff changeset
376 ATTR_TM_REGPARM, ATTR_NULL, ATTR_NOTHROW_LIST)
kono
parents: 14
diff changeset
377 DEF_ATTR_TREE_LIST (ATTR_TM_TMPURE_NOTHROW_LIST,
kono
parents: 14
diff changeset
378 ATTR_TM_TMPURE, ATTR_NULL, ATTR_TM_NOTHROW_LIST)
kono
parents: 14
diff changeset
379 DEF_ATTR_TREE_LIST (ATTR_TM_PURE_TMPURE_NOTHROW_LIST,
kono
parents: 14
diff changeset
380 ATTR_PURE, ATTR_NULL, ATTR_TM_TMPURE_NOTHROW_LIST)
kono
parents: 14
diff changeset
381 DEF_ATTR_TREE_LIST (ATTR_TM_NORETURN_NOTHROW_LIST,
kono
parents: 14
diff changeset
382 ATTR_TM_REGPARM, ATTR_NULL, ATTR_NORETURN_NOTHROW_LIST)
kono
parents: 14
diff changeset
383 DEF_ATTR_TREE_LIST (ATTR_TM_CONST_NOTHROW_LIST,
kono
parents: 14
diff changeset
384 ATTR_TM_REGPARM, ATTR_NULL, ATTR_CONST_NOTHROW_LIST)
kono
parents: 14
diff changeset
385 DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_RT_LIST,
kono
parents: 14
diff changeset
386 ATTR_RETURNS_TWICE, ATTR_NULL, ATTR_TM_NOTHROW_LIST)
kono
parents: 14
diff changeset
387
kono
parents: 14
diff changeset
388 /* Same attributes used for BUILT_IN_MALLOC except with TM_PURE thrown in. */
kono
parents: 14
diff changeset
389 DEF_ATTR_TREE_LIST (ATTR_TMPURE_MALLOC_NOTHROW_LIST,
kono
parents: 14
diff changeset
390 ATTR_TM_TMPURE, ATTR_NULL, ATTR_MALLOC_NOTHROW_LIST)
kono
parents: 14
diff changeset
391 /* Same attributes used for BUILT_IN_FREE except with TM_PURE thrown in. */
kono
parents: 14
diff changeset
392 DEF_ATTR_TREE_LIST (ATTR_TMPURE_NOTHROW_LIST,
kono
parents: 14
diff changeset
393 ATTR_TM_TMPURE, ATTR_NULL, ATTR_NOTHROW_LIST)
kono
parents: 14
diff changeset
394
kono
parents: 14
diff changeset
395 DEF_ATTR_TREE_LIST (ATTR_TMPURE_NOTHROW_LEAF_LIST,
kono
parents: 14
diff changeset
396 ATTR_TM_TMPURE, ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
397 DEF_ATTR_TREE_LIST (ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST,
kono
parents: 14
diff changeset
398 ATTR_TM_TMPURE, ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
399 DEF_ATTR_TREE_LIST (ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST,
kono
parents: 14
diff changeset
400 ATTR_COLD, ATTR_NULL,
kono
parents: 14
diff changeset
401 ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
kono
parents: 14
diff changeset
402
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
403 /* Construct a tree for a format_arg attribute. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
404 #define DEF_FORMAT_ARG_ATTRIBUTE(FA) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
405 DEF_ATTR_TREE_LIST (ATTR_FORMAT_ARG_##FA, ATTR_FORMAT_ARG, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
406 ATTR_LIST_##FA, ATTR_NOTHROW_NONNULL_##FA)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
407 DEF_FORMAT_ARG_ATTRIBUTE(1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
408 DEF_FORMAT_ARG_ATTRIBUTE(2)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
409 #undef DEF_FORMAT_ARG_ATTRIBUTE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
410