68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 /* Definitions for c-common.c.
|
111
|
2 Copyright (C) 1987-2017 Free Software Foundation, Inc.
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 This file is part of GCC.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 GCC is free software; you can redistribute it and/or modify it under
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 the terms of the GNU General Public License as published by the Free
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 Software Foundation; either version 3, or (at your option) any later
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 version.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 for more details.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 You should have received a copy of the GNU General Public License
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 along with GCC; see the file COPYING3. If not see
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 <http://www.gnu.org/licenses/>. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20 #ifndef GCC_C_COMMON_H
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21 #define GCC_C_COMMON_H
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 #include "splay-tree.h"
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 #include "cpplib.h"
|
111
|
25 #include "alias.h"
|
|
26 #include "tree.h"
|
|
27 #include "fold-const.h"
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
28
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
29 /* In order for the format checking to accept the C frontend
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
30 diagnostic framework extensions, you must include this file before
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
31 diagnostic-core.h, not after. The C front end formats are a subset of those
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
32 for C++, so they are the appropriate set to use in common code;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
33 cp-tree.h overrides this for C++. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
34 #if defined(GCC_DIAGNOSTIC_CORE_H)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
35 #error \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
36 In order for the format checking to accept the C front end diagnostic \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
37 framework extensions, you must include this file before diagnostic-core.h \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
38 never after.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
39 #endif
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
40 #ifndef GCC_DIAG_STYLE
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
41 #define GCC_DIAG_STYLE __gcc_cdiag__
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
42 #endif
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
43 #include "diagnostic-core.h"
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
44
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
45 /* Usage of TREE_LANG_FLAG_?:
|
111
|
46 0: IDENTIFIER_MARKED (used by search routines).
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
47 C_MAYBE_CONST_EXPR_INT_OPERANDS (in C_MAYBE_CONST_EXPR, for C)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
48 1: C_DECLARED_LABEL_FLAG (in LABEL_DECL)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
49 STATEMENT_LIST_STMT_EXPR (in STATEMENT_LIST)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
50 C_MAYBE_CONST_EXPR_NON_CONST (in C_MAYBE_CONST_EXPR, for C)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
51 2: unused
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
52 3: STATEMENT_LIST_HAS_LABEL (in STATEMENT_LIST)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
53 4: unused
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
54 */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
55
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
56 /* Reserved identifiers. This is the union of all the keywords for C,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
57 C++, and Objective-C. All the type modifiers have to be in one
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
58 block at the beginning, because they are used as mask bits. There
|
111
|
59 are 28 type modifiers; if we add many more we will have to redesign
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
60 the mask mechanism. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
61
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
62 enum rid
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
63 {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
64 /* Modifiers: */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
65 /* C, in empirical order of frequency. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
66 RID_STATIC = 0,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
67 RID_UNSIGNED, RID_LONG, RID_CONST, RID_EXTERN,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
68 RID_REGISTER, RID_TYPEDEF, RID_SHORT, RID_INLINE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
69 RID_VOLATILE, RID_SIGNED, RID_AUTO, RID_RESTRICT,
|
111
|
70 RID_NORETURN, RID_ATOMIC,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
71
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
72 /* C extensions */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
73 RID_COMPLEX, RID_THREAD, RID_SAT,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
74
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
75 /* C++ */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
76 RID_FRIEND, RID_VIRTUAL, RID_EXPLICIT, RID_EXPORT, RID_MUTABLE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
77
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
78 /* ObjC ("PQ" reserved words - they do not appear after a '@' and
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
79 are keywords only in specific contexts) */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
80 RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF, RID_ONEWAY,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
81
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
82 /* ObjC ("PATTR" reserved words - they do not appear after a '@'
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
83 and are keywords only as property attributes) */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
84 RID_GETTER, RID_SETTER,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
85 RID_READONLY, RID_READWRITE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
86 RID_ASSIGN, RID_RETAIN, RID_COPY,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
87 RID_NONATOMIC,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
88
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
89 /* C (reserved and imaginary types not implemented, so any use is a
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
90 syntax error) */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
91 RID_IMAGINARY,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
92
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
93 /* C */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
94 RID_INT, RID_CHAR, RID_FLOAT, RID_DOUBLE, RID_VOID,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
95 RID_ENUM, RID_STRUCT, RID_UNION, RID_IF, RID_ELSE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
96 RID_WHILE, RID_DO, RID_FOR, RID_SWITCH, RID_CASE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
97 RID_DEFAULT, RID_BREAK, RID_CONTINUE, RID_RETURN, RID_GOTO,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
98 RID_SIZEOF,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
99
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
100 /* C extensions */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
101 RID_ASM, RID_TYPEOF, RID_ALIGNOF, RID_ATTRIBUTE, RID_VA_ARG,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
102 RID_EXTENSION, RID_IMAGPART, RID_REALPART, RID_LABEL, RID_CHOOSE_EXPR,
|
111
|
103 RID_TYPES_COMPATIBLE_P, RID_BUILTIN_COMPLEX, RID_BUILTIN_SHUFFLE,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
104 RID_DFLOAT32, RID_DFLOAT64, RID_DFLOAT128,
|
111
|
105
|
|
106 /* TS 18661-3 keywords, in the same sequence as the TI_* values. */
|
|
107 RID_FLOAT16,
|
|
108 RID_FLOATN_NX_FIRST = RID_FLOAT16,
|
|
109 RID_FLOAT32,
|
|
110 RID_FLOAT64,
|
|
111 RID_FLOAT128,
|
|
112 RID_FLOAT32X,
|
|
113 RID_FLOAT64X,
|
|
114 RID_FLOAT128X,
|
|
115 #define CASE_RID_FLOATN_NX \
|
|
116 case RID_FLOAT16: case RID_FLOAT32: case RID_FLOAT64: case RID_FLOAT128: \
|
|
117 case RID_FLOAT32X: case RID_FLOAT64X: case RID_FLOAT128X
|
|
118
|
|
119 RID_FRACT, RID_ACCUM, RID_AUTO_TYPE, RID_BUILTIN_CALL_WITH_STATIC_CHAIN,
|
|
120
|
|
121 /* "__GIMPLE", for the GIMPLE-parsing extension to the C frontend. */
|
|
122 RID_GIMPLE,
|
|
123
|
|
124 /* "__PHI", for parsing PHI function in GIMPLE FE. */
|
|
125 RID_PHI,
|
|
126
|
|
127 /* "__RTL", for the RTL-parsing extension to the C frontend. */
|
|
128 RID_RTL,
|
|
129
|
|
130 /* C11 */
|
|
131 RID_ALIGNAS, RID_GENERIC,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
132
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
133 /* This means to warn that this is a C++ keyword, and then treat it
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
134 as a normal identifier. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
135 RID_CXX_COMPAT_WARN,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
136
|
111
|
137 /* GNU transactional memory extension */
|
|
138 RID_TRANSACTION_ATOMIC, RID_TRANSACTION_RELAXED, RID_TRANSACTION_CANCEL,
|
|
139
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
140 /* Too many ways of getting the name of a function as a string */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
141 RID_FUNCTION_NAME, RID_PRETTY_FUNCTION_NAME, RID_C99_FUNCTION_NAME,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
142
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
143 /* C++ (some of these are keywords in Objective-C as well, but only
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
144 if they appear after a '@') */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
145 RID_BOOL, RID_WCHAR, RID_CLASS,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
146 RID_PUBLIC, RID_PRIVATE, RID_PROTECTED,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
147 RID_TEMPLATE, RID_NULL, RID_CATCH,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
148 RID_DELETE, RID_FALSE, RID_NAMESPACE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
149 RID_NEW, RID_OFFSETOF, RID_OPERATOR,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
150 RID_THIS, RID_THROW, RID_TRUE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
151 RID_TRY, RID_TYPENAME, RID_TYPEID,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
152 RID_USING, RID_CHAR16, RID_CHAR32,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
153
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
154 /* casts */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
155 RID_CONSTCAST, RID_DYNCAST, RID_REINTCAST, RID_STATCAST,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
156
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
157 /* C++ extensions */
|
111
|
158 RID_ADDRESSOF, RID_BASES,
|
|
159 RID_BUILTIN_LAUNDER, RID_DIRECT_BASES,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
160 RID_HAS_NOTHROW_ASSIGN, RID_HAS_NOTHROW_CONSTRUCTOR,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
161 RID_HAS_NOTHROW_COPY, RID_HAS_TRIVIAL_ASSIGN,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
162 RID_HAS_TRIVIAL_CONSTRUCTOR, RID_HAS_TRIVIAL_COPY,
|
111
|
163 RID_HAS_TRIVIAL_DESTRUCTOR, RID_HAS_UNIQUE_OBJ_REPRESENTATIONS,
|
|
164 RID_HAS_VIRTUAL_DESTRUCTOR,
|
|
165 RID_IS_ABSTRACT, RID_IS_AGGREGATE,
|
|
166 RID_IS_BASE_OF, RID_IS_CLASS,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
167 RID_IS_EMPTY, RID_IS_ENUM,
|
111
|
168 RID_IS_FINAL, RID_IS_LITERAL_TYPE,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
169 RID_IS_POD, RID_IS_POLYMORPHIC,
|
111
|
170 RID_IS_SAME_AS,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
171 RID_IS_STD_LAYOUT, RID_IS_TRIVIAL,
|
111
|
172 RID_IS_TRIVIALLY_ASSIGNABLE, RID_IS_TRIVIALLY_CONSTRUCTIBLE,
|
|
173 RID_IS_TRIVIALLY_COPYABLE,
|
|
174 RID_IS_UNION, RID_UNDERLYING_TYPE,
|
|
175 RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
176
|
111
|
177 /* C++11 */
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
178 RID_CONSTEXPR, RID_DECLTYPE, RID_NOEXCEPT, RID_NULLPTR, RID_STATIC_ASSERT,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
179
|
111
|
180 /* C++ concepts */
|
|
181 RID_CONCEPT, RID_REQUIRES,
|
|
182
|
|
183 /* C++ transactional memory. */
|
|
184 RID_ATOMIC_NOEXCEPT, RID_ATOMIC_CANCEL, RID_SYNCHRONIZED,
|
|
185
|
|
186 /* Cilk Plus keywords. */
|
|
187 RID_CILK_SPAWN, RID_CILK_SYNC, RID_CILK_FOR,
|
|
188
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
189 /* Objective-C ("AT" reserved words - they are only keywords when
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
190 they follow '@') */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
191 RID_AT_ENCODE, RID_AT_END,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
192 RID_AT_CLASS, RID_AT_ALIAS, RID_AT_DEFS,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
193 RID_AT_PRIVATE, RID_AT_PROTECTED, RID_AT_PUBLIC, RID_AT_PACKAGE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
194 RID_AT_PROTOCOL, RID_AT_SELECTOR,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
195 RID_AT_THROW, RID_AT_TRY, RID_AT_CATCH,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
196 RID_AT_FINALLY, RID_AT_SYNCHRONIZED,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
197 RID_AT_OPTIONAL, RID_AT_REQUIRED, RID_AT_PROPERTY,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
198 RID_AT_SYNTHESIZE, RID_AT_DYNAMIC,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
199 RID_AT_INTERFACE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
200 RID_AT_IMPLEMENTATION,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
201
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
202 /* Named address support, mapping the keyword to a particular named address
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
203 number. Named address space 0 is reserved for the generic address. If
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
204 there are more than 254 named addresses, the addr_space_t type will need
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
205 to be grown from an unsigned char to unsigned short. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
206 RID_ADDR_SPACE_0, /* generic address */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
207 RID_ADDR_SPACE_1,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
208 RID_ADDR_SPACE_2,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
209 RID_ADDR_SPACE_3,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
210 RID_ADDR_SPACE_4,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
211 RID_ADDR_SPACE_5,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
212 RID_ADDR_SPACE_6,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
213 RID_ADDR_SPACE_7,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
214 RID_ADDR_SPACE_8,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
215 RID_ADDR_SPACE_9,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
216 RID_ADDR_SPACE_10,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
217 RID_ADDR_SPACE_11,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
218 RID_ADDR_SPACE_12,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
219 RID_ADDR_SPACE_13,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
220 RID_ADDR_SPACE_14,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
221 RID_ADDR_SPACE_15,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
222
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
223 RID_FIRST_ADDR_SPACE = RID_ADDR_SPACE_0,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
224 RID_LAST_ADDR_SPACE = RID_ADDR_SPACE_15,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
225
|
111
|
226 /* __intN keywords. The _N_M here doesn't correspond to the intN
|
|
227 in the keyword; use the bitsize in int_n_t_data_t[M] for that.
|
|
228 For example, if int_n_t_data_t[0].bitsize is 13, then RID_INT_N_0
|
|
229 is for __int13. */
|
|
230
|
|
231 /* Note that the range to use is RID_FIRST_INT_N through
|
|
232 RID_FIRST_INT_N + NUM_INT_N_ENTS - 1 and c-parser.c has a list of
|
|
233 all RID_INT_N_* in a case statement. */
|
|
234
|
|
235 RID_INT_N_0,
|
|
236 RID_INT_N_1,
|
|
237 RID_INT_N_2,
|
|
238 RID_INT_N_3,
|
|
239
|
|
240 RID_FIRST_INT_N = RID_INT_N_0,
|
|
241 RID_LAST_INT_N = RID_INT_N_3,
|
|
242
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
243 RID_MAX,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
244
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
245 RID_FIRST_MODIFIER = RID_STATIC,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
246 RID_LAST_MODIFIER = RID_ONEWAY,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
247
|
111
|
248 RID_FIRST_CXX11 = RID_CONSTEXPR,
|
|
249 RID_LAST_CXX11 = RID_STATIC_ASSERT,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
250 RID_FIRST_AT = RID_AT_ENCODE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
251 RID_LAST_AT = RID_AT_IMPLEMENTATION,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
252 RID_FIRST_PQ = RID_IN,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
253 RID_LAST_PQ = RID_ONEWAY,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
254 RID_FIRST_PATTR = RID_GETTER,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
255 RID_LAST_PATTR = RID_NONATOMIC
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
256 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
257
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
258 #define OBJC_IS_AT_KEYWORD(rid) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
259 ((unsigned int) (rid) >= (unsigned int) RID_FIRST_AT && \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
260 (unsigned int) (rid) <= (unsigned int) RID_LAST_AT)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
261
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
262 #define OBJC_IS_PQ_KEYWORD(rid) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
263 ((unsigned int) (rid) >= (unsigned int) RID_FIRST_PQ && \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
264 (unsigned int) (rid) <= (unsigned int) RID_LAST_PQ)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
265
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
266 #define OBJC_IS_PATTR_KEYWORD(rid) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
267 ((unsigned int) (rid) >= (unsigned int) RID_FIRST_PATTR && \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
268 (unsigned int) (rid) <= (unsigned int) RID_LAST_PATTR)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
269
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
270 /* OBJC_IS_CXX_KEYWORD recognizes the 'CXX_OBJC' keywords (such as
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
271 'class') which are shared in a subtle way between Objective-C and
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
272 C++. When the lexer is lexing in Objective-C/Objective-C++, if it
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
273 finds '@' followed by one of these identifiers (eg, '@class'), it
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
274 recognizes the whole as an Objective-C keyword. If the identifier
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
275 is found elsewhere, it follows the rules of the C/C++ language.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
276 */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
277 #define OBJC_IS_CXX_KEYWORD(rid) \
|
111
|
278 (rid == RID_CLASS || rid == RID_SYNCHRONIZED \
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
279 || rid == RID_PUBLIC || rid == RID_PROTECTED || rid == RID_PRIVATE \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
280 || rid == RID_TRY || rid == RID_THROW || rid == RID_CATCH)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
281
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
282 /* The elements of `ridpointers' are identifier nodes for the reserved
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
283 type names and storage classes. It is indexed by a RID_... value. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
284 extern GTY ((length ("(int) RID_MAX"))) tree *ridpointers;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
285
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
286 /* Standard named or nameless data types of the C compiler. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
287
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
288 enum c_tree_index
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
289 {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
290 CTI_CHAR16_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
291 CTI_CHAR32_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
292 CTI_WCHAR_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
293 CTI_UNDERLYING_WCHAR_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
294 CTI_WINT_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
295 CTI_SIGNED_SIZE_TYPE, /* For format checking only. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
296 CTI_UNSIGNED_PTRDIFF_TYPE, /* For format checking only. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
297 CTI_INTMAX_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
298 CTI_UINTMAX_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
299 CTI_WIDEST_INT_LIT_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
300 CTI_WIDEST_UINT_LIT_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
301
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
302 /* Types for <stdint.h>, that may not be defined on all
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
303 targets. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
304 CTI_SIG_ATOMIC_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
305 CTI_INT8_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
306 CTI_INT16_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
307 CTI_INT32_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
308 CTI_INT64_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
309 CTI_UINT8_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
310 CTI_UINT16_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
311 CTI_UINT32_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
312 CTI_UINT64_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
313 CTI_INT_LEAST8_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
314 CTI_INT_LEAST16_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
315 CTI_INT_LEAST32_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
316 CTI_INT_LEAST64_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
317 CTI_UINT_LEAST8_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
318 CTI_UINT_LEAST16_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
319 CTI_UINT_LEAST32_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
320 CTI_UINT_LEAST64_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
321 CTI_INT_FAST8_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
322 CTI_INT_FAST16_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
323 CTI_INT_FAST32_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
324 CTI_INT_FAST64_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
325 CTI_UINT_FAST8_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
326 CTI_UINT_FAST16_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
327 CTI_UINT_FAST32_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
328 CTI_UINT_FAST64_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
329 CTI_INTPTR_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
330 CTI_UINTPTR_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
331
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
332 CTI_CHAR_ARRAY_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
333 CTI_CHAR16_ARRAY_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
334 CTI_CHAR32_ARRAY_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
335 CTI_WCHAR_ARRAY_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
336 CTI_STRING_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
337 CTI_CONST_STRING_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
338
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
339 /* Type for boolean expressions (bool in C++, int in C). */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
340 CTI_TRUTHVALUE_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
341 CTI_TRUTHVALUE_TRUE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
342 CTI_TRUTHVALUE_FALSE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
343
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
344 CTI_DEFAULT_FUNCTION_TYPE,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
345
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
346 /* These are not types, but we have to look them up all the time. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
347 CTI_FUNCTION_NAME_DECL,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
348 CTI_PRETTY_FUNCTION_NAME_DECL,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
349 CTI_C99_FUNCTION_NAME_DECL,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
350 CTI_SAVED_FUNCTION_NAME_DECLS,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
351
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
352 CTI_NULL,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
353
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
354 CTI_MAX
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
355 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
356
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
357 #define C_CPP_HASHNODE(id) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
358 (&(((struct c_common_identifier *) (id))->node))
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
359 #define C_RID_CODE(id) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
360 ((enum rid) (((struct c_common_identifier *) (id))->node.rid_code))
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
361 #define C_SET_RID_CODE(id, code) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
362 (((struct c_common_identifier *) (id))->node.rid_code = (unsigned char) code)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
363
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
364 /* Identifier part common to the C front ends. Inherits from
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
365 tree_identifier, despite appearances. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
366 struct GTY(()) c_common_identifier {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
367 struct tree_common common;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
368 struct cpp_hashnode node;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
369 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
370
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
371 /* An entry in the reserved keyword table. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
372
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
373 struct c_common_resword
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
374 {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
375 const char *const word;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
376 ENUM_BITFIELD(rid) const rid : 16;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
377 const unsigned int disable : 16;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
378 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
379
|
111
|
380 /* Mode used to build pointers (VOIDmode means ptr_mode). */
|
|
381
|
|
382 extern machine_mode c_default_pointer_mode;
|
|
383
|
|
384 /* Extra cpp_ttype values for C++. */
|
|
385
|
|
386 /* A token type for template-ids. If a template-id is processed while
|
|
387 parsing tentatively, it is replaced with a CPP_TEMPLATE_ID token;
|
|
388 the value of the CPP_TEMPLATE_ID is whatever was returned by
|
|
389 cp_parser_template_id. */
|
|
390 #define CPP_TEMPLATE_ID ((enum cpp_ttype) (CPP_KEYWORD + 1))
|
|
391
|
|
392 /* A token type for nested-name-specifiers. If a
|
|
393 nested-name-specifier is processed while parsing tentatively, it is
|
|
394 replaced with a CPP_NESTED_NAME_SPECIFIER token; the value of the
|
|
395 CPP_NESTED_NAME_SPECIFIER is whatever was returned by
|
|
396 cp_parser_nested_name_specifier_opt. */
|
|
397 #define CPP_NESTED_NAME_SPECIFIER ((enum cpp_ttype) (CPP_TEMPLATE_ID + 1))
|
|
398
|
|
399 /* A token type for pre-parsed C++0x decltype. */
|
|
400 #define CPP_DECLTYPE ((enum cpp_ttype) (CPP_NESTED_NAME_SPECIFIER + 1))
|
|
401
|
|
402 /* A token type for pre-parsed primary-expression (lambda- or statement-). */
|
|
403 #define CPP_PREPARSED_EXPR ((enum cpp_ttype) (CPP_DECLTYPE + 1))
|
|
404
|
|
405 /* The number of token types, including C++-specific ones. */
|
|
406 #define N_CP_TTYPES ((int) (CPP_PREPARSED_EXPR + 1))
|
|
407
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
408 /* Disable mask. Keywords are disabled if (reswords[i].disable &
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
409 mask) is _true_. Thus for keywords which are present in all
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
410 languages the disable field is zero. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
411
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
412 #define D_CONLY 0x001 /* C only (not in C++). */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
413 #define D_CXXONLY 0x002 /* C++ only (not in C). */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
414 #define D_C99 0x004 /* In C, C99 only. */
|
111
|
415 #define D_CXX11 0x008 /* In C++, C++11 only. */
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
416 #define D_EXT 0x010 /* GCC extension. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
417 #define D_EXT89 0x020 /* GCC extension incorporated in C99. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
418 #define D_ASM 0x040 /* Disabled by -fno-asm. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
419 #define D_OBJC 0x080 /* In Objective C and neither C nor C++. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
420 #define D_CXX_OBJC 0x100 /* In Objective C, and C++, but not C. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
421 #define D_CXXWARN 0x200 /* In C warn with -Wcxx-compat. */
|
111
|
422 #define D_CXX_CONCEPTS 0x400 /* In C++, only with concepts. */
|
|
423 #define D_TRANSMEM 0X800 /* C++ transactional memory TS. */
|
|
424
|
|
425 #define D_CXX_CONCEPTS_FLAGS D_CXXONLY | D_CXX_CONCEPTS
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
426
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
427 /* The reserved keyword table. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
428 extern const struct c_common_resword c_common_reswords[];
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
429
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
430 /* The number of items in the reserved keyword table. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
431 extern const unsigned int num_c_common_reswords;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
432
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
433 #define char16_type_node c_global_trees[CTI_CHAR16_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
434 #define char32_type_node c_global_trees[CTI_CHAR32_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
435 #define wchar_type_node c_global_trees[CTI_WCHAR_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
436 #define underlying_wchar_type_node c_global_trees[CTI_UNDERLYING_WCHAR_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
437 #define wint_type_node c_global_trees[CTI_WINT_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
438 #define signed_size_type_node c_global_trees[CTI_SIGNED_SIZE_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
439 #define unsigned_ptrdiff_type_node c_global_trees[CTI_UNSIGNED_PTRDIFF_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
440 #define intmax_type_node c_global_trees[CTI_INTMAX_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
441 #define uintmax_type_node c_global_trees[CTI_UINTMAX_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
442 #define widest_integer_literal_type_node c_global_trees[CTI_WIDEST_INT_LIT_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
443 #define widest_unsigned_literal_type_node c_global_trees[CTI_WIDEST_UINT_LIT_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
444
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
445 #define sig_atomic_type_node c_global_trees[CTI_SIG_ATOMIC_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
446 #define int8_type_node c_global_trees[CTI_INT8_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
447 #define int16_type_node c_global_trees[CTI_INT16_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
448 #define int32_type_node c_global_trees[CTI_INT32_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
449 #define int64_type_node c_global_trees[CTI_INT64_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
450 #define uint8_type_node c_global_trees[CTI_UINT8_TYPE]
|
111
|
451 #define c_uint16_type_node c_global_trees[CTI_UINT16_TYPE]
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
452 #define c_uint32_type_node c_global_trees[CTI_UINT32_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
453 #define c_uint64_type_node c_global_trees[CTI_UINT64_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
454 #define int_least8_type_node c_global_trees[CTI_INT_LEAST8_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
455 #define int_least16_type_node c_global_trees[CTI_INT_LEAST16_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
456 #define int_least32_type_node c_global_trees[CTI_INT_LEAST32_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
457 #define int_least64_type_node c_global_trees[CTI_INT_LEAST64_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
458 #define uint_least8_type_node c_global_trees[CTI_UINT_LEAST8_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
459 #define uint_least16_type_node c_global_trees[CTI_UINT_LEAST16_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
460 #define uint_least32_type_node c_global_trees[CTI_UINT_LEAST32_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
461 #define uint_least64_type_node c_global_trees[CTI_UINT_LEAST64_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
462 #define int_fast8_type_node c_global_trees[CTI_INT_FAST8_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
463 #define int_fast16_type_node c_global_trees[CTI_INT_FAST16_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
464 #define int_fast32_type_node c_global_trees[CTI_INT_FAST32_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
465 #define int_fast64_type_node c_global_trees[CTI_INT_FAST64_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
466 #define uint_fast8_type_node c_global_trees[CTI_UINT_FAST8_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
467 #define uint_fast16_type_node c_global_trees[CTI_UINT_FAST16_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
468 #define uint_fast32_type_node c_global_trees[CTI_UINT_FAST32_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
469 #define uint_fast64_type_node c_global_trees[CTI_UINT_FAST64_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
470 #define intptr_type_node c_global_trees[CTI_INTPTR_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
471 #define uintptr_type_node c_global_trees[CTI_UINTPTR_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
472
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
473 #define truthvalue_type_node c_global_trees[CTI_TRUTHVALUE_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
474 #define truthvalue_true_node c_global_trees[CTI_TRUTHVALUE_TRUE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
475 #define truthvalue_false_node c_global_trees[CTI_TRUTHVALUE_FALSE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
476
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
477 #define char_array_type_node c_global_trees[CTI_CHAR_ARRAY_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
478 #define char16_array_type_node c_global_trees[CTI_CHAR16_ARRAY_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
479 #define char32_array_type_node c_global_trees[CTI_CHAR32_ARRAY_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
480 #define wchar_array_type_node c_global_trees[CTI_WCHAR_ARRAY_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
481 #define string_type_node c_global_trees[CTI_STRING_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
482 #define const_string_type_node c_global_trees[CTI_CONST_STRING_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
483
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
484 #define default_function_type c_global_trees[CTI_DEFAULT_FUNCTION_TYPE]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
485
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
486 #define function_name_decl_node c_global_trees[CTI_FUNCTION_NAME_DECL]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
487 #define pretty_function_name_decl_node c_global_trees[CTI_PRETTY_FUNCTION_NAME_DECL]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
488 #define c99_function_name_decl_node c_global_trees[CTI_C99_FUNCTION_NAME_DECL]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
489 #define saved_function_name_decls c_global_trees[CTI_SAVED_FUNCTION_NAME_DECLS]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
490
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
491 /* The node for C++ `__null'. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
492 #define null_node c_global_trees[CTI_NULL]
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
493
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
494 extern GTY(()) tree c_global_trees[CTI_MAX];
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
495
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
496 /* Mark which labels are explicitly declared.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
497 These may be shadowed, and may be referenced from nested functions. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
498 #define C_DECLARED_LABEL_FLAG(label) TREE_LANG_FLAG_1 (label)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
499
|
111
|
500 enum c_language_kind
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
501 {
|
111
|
502 clk_c = 0, /* C90, C94, C99 or C11 */
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
503 clk_objc = 1, /* clk_c with ObjC features. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
504 clk_cxx = 2, /* ANSI/ISO C++ */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
505 clk_objcxx = 3 /* clk_cxx with ObjC features. */
|
111
|
506 };
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
507
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
508 /* To test for a specific language use c_language, defined by each
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
509 front end. For "ObjC features" or "not C++" use the macros. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
510 extern c_language_kind c_language;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
511
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
512 #define c_dialect_cxx() ((c_language & clk_cxx) != 0)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
513 #define c_dialect_objc() ((c_language & clk_objc) != 0)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
514
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
515 /* The various name of operator that appears in error messages. */
|
111
|
516 enum ref_operator {
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
517 /* NULL */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
518 RO_NULL,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
519 /* array indexing */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
520 RO_ARRAY_INDEXING,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
521 /* unary * */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
522 RO_UNARY_STAR,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
523 /* -> */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
524 RO_ARROW,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
525 /* implicit conversion */
|
111
|
526 RO_IMPLICIT_CONVERSION,
|
|
527 /* ->* */
|
|
528 RO_ARROW_STAR
|
|
529 };
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
530
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
531 /* Information about a statement tree. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
532
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
533 struct GTY(()) stmt_tree_s {
|
111
|
534 /* A stack of statement lists being collected. */
|
|
535 vec<tree, va_gc> *x_cur_stmt_list;
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
536
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
537 /* In C++, Nonzero if we should treat statements as full
|
111
|
538 expressions. In particular, this variable is non-zero if at the
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
539 end of a statement we should destroy any temporaries created
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
540 during that statement. Similarly, if, at the end of a block, we
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
541 should destroy any local variables in this block. Normally, this
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
542 variable is nonzero, since those are the normal semantics of
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
543 C++.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
544
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
545 This flag has no effect in C. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
546 int stmts_are_full_exprs_p;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
547 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
548
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
549 typedef struct stmt_tree_s *stmt_tree;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
550
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
551 /* Global state pertinent to the current function. Some C dialects
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
552 extend this structure with additional fields. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
553
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
554 struct GTY(()) c_language_function {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
555 /* While we are parsing the function, this contains information
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
556 about the statement-tree that we are building. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
557 struct stmt_tree_s x_stmt_tree;
|
111
|
558
|
|
559 /* Vector of locally defined typedefs, for
|
|
560 -Wunused-local-typedefs. */
|
|
561 vec<tree, va_gc> *local_typedefs;
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
562 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
563
|
111
|
564 #define stmt_list_stack (current_stmt_tree ()->x_cur_stmt_list)
|
|
565
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
566 /* When building a statement-tree, this is the current statement list
|
111
|
567 being collected. */
|
|
568 #define cur_stmt_list (stmt_list_stack->last ())
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
569
|
111
|
570 #define building_stmt_list_p() (stmt_list_stack && !stmt_list_stack->is_empty())
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
571
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
572 /* Language-specific hooks. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
573
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
574 /* If non-NULL, this function is called after a precompile header file
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
575 is loaded. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
576 extern void (*lang_post_pch_load) (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
577
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
578 extern void push_file_scope (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
579 extern void pop_file_scope (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
580 extern stmt_tree current_stmt_tree (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
581 extern tree push_stmt_list (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
582 extern tree pop_stmt_list (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
583 extern tree add_stmt (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
584 extern void push_cleanup (tree, tree, bool);
|
111
|
585
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
586 extern tree build_modify_expr (location_t, tree, tree, enum tree_code,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
587 location_t, tree, tree);
|
111
|
588 extern tree build_array_notation_expr (location_t, tree, tree, enum tree_code,
|
|
589 location_t, tree, tree);
|
|
590 extern tree build_array_notation_ref (location_t, tree, tree, tree, tree, tree);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
591 extern tree build_indirect_ref (location_t, tree, ref_operator);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
592
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
593 extern bool has_c_linkage (const_tree decl);
|
111
|
594 extern bool c_decl_implicit (const_tree);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
595
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
596 /* Switches common to the C front ends. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
597
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
598 /* Nonzero means don't output line number information. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
599
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
600 extern char flag_no_line_commands;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
601
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
602 /* Nonzero causes -E output not to be done, but directives such as
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
603 #define that have side effects are still obeyed. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
604
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
605 extern char flag_no_output;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
606
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
607 /* Nonzero means dump macros in some fashion; contains the 'D', 'M',
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
608 'N' or 'U' of the command line switch. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
609
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
610 extern char flag_dump_macros;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
611
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
612 /* Nonzero means pass #include lines through to the output. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
613
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
614 extern char flag_dump_includes;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
615
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
616 /* Nonzero means process PCH files while preprocessing. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
617
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
618 extern bool flag_pch_preprocess;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
619
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
620 /* The file name to which we should write a precompiled header, or
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
621 NULL if no header will be written in this compile. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
622
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
623 extern const char *pch_file;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
624
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
625 /* Nonzero if an ISO standard was selected. It rejects macros in the
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
626 user's namespace. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
627
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
628 extern int flag_iso;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
629
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
630 /* C/ObjC language option variables. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
631
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
632
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
633 /* Nonzero means allow type mismatches in conditional expressions;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
634 just make their values `void'. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
635
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
636 extern int flag_cond_mismatch;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
637
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
638 /* Nonzero means enable C89 Amendment 1 features. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
639
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
640 extern int flag_isoc94;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
641
|
111
|
642 /* Nonzero means use the ISO C99 (or C11) dialect of C. */
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
643
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
644 extern int flag_isoc99;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
645
|
111
|
646 /* Nonzero means use the ISO C11 dialect of C. */
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
647
|
111
|
648 extern int flag_isoc11;
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
649
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
650 /* Nonzero means that we have builtin functions, and main is an int. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
651
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
652 extern int flag_hosted;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
653
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
654 /* ObjC language option variables. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
655
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
656
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
657 /* Tells the compiler that this is a special run. Do not perform any
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
658 compiling, instead we are to test some platform dependent features
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
659 and output a C header file with appropriate definitions. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
660
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
661 extern int print_struct_values;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
662
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
663 /* Tells the compiler what is the constant string class for ObjC. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
664
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
665 extern const char *constant_string_class_name;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
666
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
667
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
668 /* C++ language option variables. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
669
|
111
|
670 /* The reference version of the ABI for -Wabi. */
|
|
671
|
|
672 extern int warn_abi_version;
|
|
673
|
|
674 /* Return TRUE if one of {flag_abi_version,flag_abi_compat_version} is
|
|
675 less than N and the other is at least N. */
|
|
676 #define abi_compat_version_crosses(N) \
|
|
677 (abi_version_at_least(N) \
|
|
678 != (flag_abi_compat_version == 0 \
|
|
679 || flag_abi_compat_version >= (N)))
|
|
680
|
|
681 /* Return TRUE if one of {flag_abi_version,warn_abi_version} is
|
|
682 less than N and the other is at least N, for use by -Wabi. */
|
|
683 #define abi_version_crosses(N) \
|
|
684 (abi_version_at_least(N) \
|
|
685 != (warn_abi_version == 0 \
|
|
686 || warn_abi_version >= (N)))
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
687
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
688 /* Nonzero means generate separate instantiation control files and
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
689 juggle them at link time. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
690
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
691 extern int flag_use_repository;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
692
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
693 /* The supported C++ dialects. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
694
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
695 enum cxx_dialect {
|
111
|
696 cxx_unset,
|
|
697 /* C++98 with TC1 */
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
698 cxx98,
|
111
|
699 cxx03 = cxx98,
|
|
700 /* C++11 */
|
|
701 cxx0x,
|
|
702 cxx11 = cxx0x,
|
|
703 /* C++14 */
|
|
704 cxx14,
|
|
705 /* C++17 */
|
|
706 cxx17,
|
|
707 /* C++2a (C++20?) */
|
|
708 cxx2a
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
709 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
710
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
711 /* The C++ dialect being used. C++98 is the default. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
712 extern enum cxx_dialect cxx_dialect;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
713
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
714 /* Maximum template instantiation depth. This limit is rather
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
715 arbitrary, but it exists to limit the time it takes to notice
|
111
|
716 excessively recursive template instantiations. */
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
717
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
718 extern int max_tinst_depth;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
719
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
720 /* Nonzero means that we should not issue warnings about problems that
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
721 occur when the code is executed, because the code being processed
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
722 is not expected to be executed. This is set during parsing. This
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
723 is used for cases like sizeof() and "0 ? a : b". This is a count,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
724 not a bool, because unexecuted expressions can nest. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
725
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
726 extern int c_inhibit_evaluation_warnings;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
727
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
728 /* Whether lexing has been completed, so subsequent preprocessor
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
729 errors should use the compiler's input_location. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
730
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
731 extern bool done_lexing;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
732
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
733 /* C types are partitioned into three subsets: object, function, and
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
734 incomplete types. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
735 #define C_TYPE_OBJECT_P(type) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
736 (TREE_CODE (type) != FUNCTION_TYPE && TYPE_SIZE (type))
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
737
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
738 #define C_TYPE_INCOMPLETE_P(type) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
739 (TREE_CODE (type) != FUNCTION_TYPE && TYPE_SIZE (type) == 0)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
740
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
741 #define C_TYPE_FUNCTION_P(type) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
742 (TREE_CODE (type) == FUNCTION_TYPE)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
743
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
744 /* For convenience we define a single macro to identify the class of
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
745 object or incomplete types. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
746 #define C_TYPE_OBJECT_OR_INCOMPLETE_P(type) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
747 (!C_TYPE_FUNCTION_P (type))
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
748
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
749 struct visibility_flags
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
750 {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
751 unsigned inpragma : 1; /* True when in #pragma GCC visibility. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
752 unsigned inlines_hidden : 1; /* True when -finlineshidden in effect. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
753 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
754
|
111
|
755 /* These enumerators are possible types of unsafe conversions. */
|
|
756 enum conversion_safety {
|
|
757 /* The conversion is safe. */
|
|
758 SAFE_CONVERSION = 0,
|
|
759 /* Another type of conversion with problems. */
|
|
760 UNSAFE_OTHER,
|
|
761 /* Conversion between signed and unsigned integers
|
|
762 which are all warned about immediately, so this is unused. */
|
|
763 UNSAFE_SIGN,
|
|
764 /* Conversions that reduce the precision of reals including conversions
|
|
765 from reals to integers. */
|
|
766 UNSAFE_REAL,
|
|
767 /* Conversions from complex to reals or integers, that discard imaginary
|
|
768 component. */
|
|
769 UNSAFE_IMAGINARY
|
|
770 };
|
|
771
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
772 /* Global visibility options. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
773 extern struct visibility_flags visibility_options;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
774
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
775 /* Attribute table common to the C front ends. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
776 extern const struct attribute_spec c_common_attribute_table[];
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
777 extern const struct attribute_spec c_common_format_attribute_table[];
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
778
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
779 /* Pointer to function to lazily generate the VAR_DECL for __FUNCTION__ etc.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
780 ID is the identifier to use, NAME is the string.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
781 TYPE_DEP indicates whether it depends on type of the function or not
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
782 (i.e. __PRETTY_FUNCTION__). */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
783
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
784 extern tree (*make_fname_decl) (location_t, tree, int);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
785
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
786 /* In c-decl.c and cp/tree.c. FIXME. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
787 extern void c_register_addr_space (const char *str, addr_space_t as);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
788
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
789 /* In c-common.c. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
790 extern bool in_late_binary_op;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
791 extern const char *c_addr_space_name (addr_space_t as);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
792 extern tree identifier_global_value (tree);
|
111
|
793 extern tree c_linkage_bindings (tree);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
794 extern void record_builtin_type (enum rid, const char *, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
795 extern tree build_void_list_node (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
796 extern void start_fname_decls (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
797 extern void finish_fname_decls (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
798 extern const char *fname_as_string (int);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
799 extern tree fname_decl (location_t, unsigned, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
800
|
111
|
801 extern int check_user_alignment (const_tree, bool);
|
|
802 extern bool check_function_arguments (location_t loc, const_tree, const_tree,
|
|
803 int, tree *, vec<location_t> *);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
804 extern void check_function_arguments_recurse (void (*)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
805 (void *, tree,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
806 unsigned HOST_WIDE_INT),
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
807 void *, tree,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
808 unsigned HOST_WIDE_INT);
|
111
|
809 extern bool check_builtin_function_arguments (location_t, vec<location_t>,
|
|
810 tree, int, tree *);
|
|
811 extern void check_function_format (tree, int, tree *, vec<location_t> *);
|
|
812 extern bool attribute_fallthrough_p (tree);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
813 extern tree handle_format_attribute (tree *, tree, tree, int, bool *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
814 extern tree handle_format_arg_attribute (tree *, tree, tree, int, bool *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
815 extern bool c_common_handle_option (size_t, const char *, int, int, location_t,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
816 const struct cl_option_handlers *);
|
111
|
817 extern bool default_handle_c_option (size_t, const char *, int);
|
|
818 extern tree c_common_type_for_mode (machine_mode, int);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
819 extern tree c_common_type_for_size (unsigned int, int);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
820 extern tree c_common_fixed_point_type_for_size (unsigned int, unsigned int,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
821 int, int);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
822 extern tree c_common_unsigned_type (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
823 extern tree c_common_signed_type (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
824 extern tree c_common_signed_or_unsigned_type (int, tree);
|
111
|
825 extern void c_common_init_ts (void);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
826 extern tree c_build_bitfield_integer_type (unsigned HOST_WIDE_INT, int);
|
111
|
827 extern enum conversion_safety unsafe_conversion_p (location_t, tree, tree, tree,
|
|
828 bool);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
829 extern bool decl_with_nonnull_addr_p (const_tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
830 extern tree c_fully_fold (tree, bool, bool *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
831 extern tree c_wrap_maybe_const (tree, bool);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
832 extern tree c_common_truthvalue_conversion (location_t, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
833 extern void c_apply_type_quals_to_decl (int, tree);
|
111
|
834 extern tree c_sizeof_or_alignof_type (location_t, tree, bool, bool, int);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
835 extern tree c_alignof_expr (location_t, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
836 /* Print an error message for invalid operands to arith operation CODE.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
837 NOP_EXPR is used as a special case (see truthvalue_conversion). */
|
111
|
838 extern void binary_op_error (rich_location *, enum tree_code, tree, tree);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
839 extern tree fix_string_type (tree);
|
111
|
840 extern tree convert_and_check (location_t, tree, tree);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
841 extern bool c_determine_visibility (tree);
|
111
|
842 extern bool vector_types_compatible_elements_p (tree, tree);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
843 extern void mark_valid_location_for_stdc_pragma (bool);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
844 extern bool valid_location_for_stdc_pragma_p (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
845 extern void set_float_const_decimal64 (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
846 extern void clear_float_const_decimal64 (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
847 extern bool float_const_decimal64_p (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
848
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
849 extern bool keyword_begins_type_specifier (enum rid);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
850 extern bool keyword_is_storage_class_specifier (enum rid);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
851 extern bool keyword_is_type_qualifier (enum rid);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
852 extern bool keyword_is_decl_specifier (enum rid);
|
111
|
853 extern unsigned max_align_t_align (void);
|
|
854 extern bool cxx_fundamental_alignment_p (unsigned);
|
|
855 extern bool pointer_to_zero_sized_aggr_p (tree);
|
|
856 extern bool bool_promoted_to_int_p (tree);
|
|
857 extern tree fold_for_warn (tree);
|
|
858 extern tree c_common_get_narrower (tree, int *);
|
|
859 extern bool get_nonnull_operand (tree, unsigned HOST_WIDE_INT *);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
860
|
111
|
861 #define c_sizeof(LOC, T) c_sizeof_or_alignof_type (LOC, T, true, false, 1)
|
|
862 #define c_alignof(LOC, T) c_sizeof_or_alignof_type (LOC, T, false, false, 1)
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
863
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
864 /* Subroutine of build_binary_op, used for certain operations. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
865 extern tree shorten_binary_op (tree result_type, tree op0, tree op1, bool bitwise);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
866
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
867 /* Subroutine of build_binary_op, used for comparison operations.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
868 See if the operands have both been converted from subword integer types
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
869 and, if so, perhaps change them both back to their original type. */
|
111
|
870 extern tree shorten_compare (location_t, tree *, tree *, tree *,
|
|
871 enum tree_code *);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
872
|
111
|
873 extern tree pointer_int_sum (location_t, enum tree_code, tree, tree,
|
|
874 bool = true);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
875
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
876 /* Add qualifiers to a type, in the fashion for C. */
|
111
|
877 extern tree c_build_qualified_type (tree, int, tree = NULL_TREE, size_t = 0);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
878
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
879 /* Build tree nodes and builtin functions common to both C and C++ language
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
880 frontends. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
881 extern void c_common_nodes_and_builtins (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
882
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
883 extern void disable_builtin_function (const char *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
884
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
885 extern void set_compound_literal_name (tree decl);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
886
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
887 extern tree build_va_arg (location_t, tree, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
888
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
889 extern const unsigned int c_family_lang_mask;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
890 extern unsigned int c_common_option_lang_mask (void);
|
111
|
891 extern void c_common_diagnostics_set_defaults (diagnostic_context *);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
892 extern bool c_common_complain_wrong_lang_p (const struct cl_option *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
893 extern void c_common_init_options_struct (struct gcc_options *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
894 extern void c_common_init_options (unsigned int, struct cl_decoded_option *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
895 extern bool c_common_post_options (const char **);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
896 extern bool c_common_init (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
897 extern void c_common_finish (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
898 extern void c_common_parse_file (void);
|
111
|
899 extern FILE *get_dump_info (int, dump_flags_t *);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
900 extern alias_set_type c_common_get_alias_set (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
901 extern void c_register_builtin_type (tree, const char*);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
902 extern bool c_promoting_integer_type_p (const_tree);
|
111
|
903 extern bool self_promoting_args_p (const_tree);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
904 extern tree strip_pointer_operator (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
905 extern tree strip_pointer_or_array_types (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
906 extern HOST_WIDE_INT c_common_to_target_charset (HOST_WIDE_INT);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
907
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
908 /* This is the basic parsing function. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
909 extern void c_parse_file (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
910
|
111
|
911 extern void c_parse_final_cleanups (void);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
912
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
913 /* These macros provide convenient access to the various _STMT nodes. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
914
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
915 /* Nonzero if a given STATEMENT_LIST represents the outermost binding
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
916 if a statement expression. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
917 #define STATEMENT_LIST_STMT_EXPR(NODE) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
918 TREE_LANG_FLAG_1 (STATEMENT_LIST_CHECK (NODE))
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
919
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
920 /* Nonzero if a label has been added to the statement list. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
921 #define STATEMENT_LIST_HAS_LABEL(NODE) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
922 TREE_LANG_FLAG_3 (STATEMENT_LIST_CHECK (NODE))
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
923
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
924 /* C_MAYBE_CONST_EXPR accessors. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
925 #define C_MAYBE_CONST_EXPR_PRE(NODE) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
926 TREE_OPERAND (C_MAYBE_CONST_EXPR_CHECK (NODE), 0)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
927 #define C_MAYBE_CONST_EXPR_EXPR(NODE) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
928 TREE_OPERAND (C_MAYBE_CONST_EXPR_CHECK (NODE), 1)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
929 #define C_MAYBE_CONST_EXPR_INT_OPERANDS(NODE) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
930 TREE_LANG_FLAG_0 (C_MAYBE_CONST_EXPR_CHECK (NODE))
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
931 #define C_MAYBE_CONST_EXPR_NON_CONST(NODE) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
932 TREE_LANG_FLAG_1 (C_MAYBE_CONST_EXPR_CHECK (NODE))
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
933 #define EXPR_INT_CONST_OPERANDS(EXPR) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
934 (INTEGRAL_TYPE_P (TREE_TYPE (EXPR)) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
935 && (TREE_CODE (EXPR) == INTEGER_CST \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
936 || (TREE_CODE (EXPR) == C_MAYBE_CONST_EXPR \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
937 && C_MAYBE_CONST_EXPR_INT_OPERANDS (EXPR))))
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
938
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
939 /* In a FIELD_DECL, nonzero if the decl was originally a bitfield. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
940 #define DECL_C_BIT_FIELD(NODE) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
941 (DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) == 1)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
942 #define SET_DECL_C_BIT_FIELD(NODE) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
943 (DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) = 1)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
944 #define CLEAR_DECL_C_BIT_FIELD(NODE) \
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
945 (DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) = 0)
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
946
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
947 extern tree do_case (location_t, tree, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
948 extern tree build_stmt (location_t, enum tree_code, ...);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
949 extern tree build_real_imag_expr (location_t, enum tree_code, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
950
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
951 /* These functions must be defined by each front-end which implements
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
952 a variant of the C language. They are used in c-common.c. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
953
|
111
|
954 extern tree build_unary_op (location_t, enum tree_code, tree, bool);
|
|
955 extern tree build_binary_op (location_t, enum tree_code, tree, tree, bool);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
956 extern tree perform_integral_promotions (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
957
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
958 /* These functions must be defined by each front-end which implements
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
959 a variant of the C language. They are used by port files. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
960
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
961 extern tree default_conversion (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
962
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
963 /* Given two integer or real types, return the type for their sum.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
964 Given two compatible ANSI C types, returns the merged type. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
965
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
966 extern tree common_type (tree, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
967
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
968 extern tree decl_constant_value (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
969
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
970 /* Handle increment and decrement of boolean types. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
971 extern tree boolean_increment (enum tree_code, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
972
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
973 extern int case_compare (splay_tree_key, splay_tree_key);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
974
|
111
|
975 extern tree c_add_case_label (location_t, splay_tree, tree, tree, tree, tree,
|
|
976 bool *);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
977
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
978 extern tree build_function_call (location_t, tree, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
979
|
111
|
980 extern tree build_function_call_vec (location_t, vec<location_t>, tree,
|
|
981 vec<tree, va_gc> *, vec<tree, va_gc> *);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
982
|
111
|
983 extern tree resolve_overloaded_builtin (location_t, tree, vec<tree, va_gc> *);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
984
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
985 extern tree finish_label_address_expr (tree, location_t);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
986
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
987 /* Same function prototype, but the C and C++ front ends have
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
988 different implementations. Used in c-common.c. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
989 extern tree lookup_label (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
990 extern tree lookup_name (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
991 extern bool lvalue_p (const_tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
992
|
111
|
993 enum lookup_name_fuzzy_kind {
|
|
994 /* Names of types. */
|
|
995 FUZZY_LOOKUP_TYPENAME,
|
|
996
|
|
997 /* Names of function decls. */
|
|
998 FUZZY_LOOKUP_FUNCTION_NAME,
|
|
999
|
|
1000 /* Any name. */
|
|
1001 FUZZY_LOOKUP_NAME
|
|
1002 };
|
|
1003 extern const char *lookup_name_fuzzy (tree, enum lookup_name_fuzzy_kind);
|
|
1004
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1005 extern bool vector_targets_convertible_p (const_tree t1, const_tree t2);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1006 extern bool vector_types_convertible_p (const_tree t1, const_tree t2, bool emit_lax_note);
|
111
|
1007 extern tree c_build_vec_perm_expr (location_t, tree, tree, tree, bool = true);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1008
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1009 extern void init_c_lex (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1010
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1011 extern void c_cpp_builtins (cpp_reader *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1012 extern void c_cpp_builtins_optimize_pragma (cpp_reader *, tree, tree);
|
111
|
1013 extern bool c_cpp_error (cpp_reader *, int, int, rich_location *,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1014 const char *, va_list *)
|
111
|
1015 ATTRIBUTE_GCC_DIAG(5,0);
|
|
1016 extern int c_common_has_attribute (cpp_reader *);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1017
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1018 extern bool parse_optimize_options (tree, bool);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1019
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1020 /* Positive if an implicit `extern "C"' scope has just been entered;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1021 negative if such a scope has just been exited. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1022 extern GTY(()) int pending_lang_change;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1023
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1024 /* Information recorded about each file examined during compilation. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1025
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1026 struct c_fileinfo
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1027 {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1028 int time; /* Time spent in the file. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1029
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1030 /* Flags used only by C++.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1031 INTERFACE_ONLY nonzero means that we are in an "interface" section
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1032 of the compiler. INTERFACE_UNKNOWN nonzero means we cannot trust
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1033 the value of INTERFACE_ONLY. If INTERFACE_UNKNOWN is zero and
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1034 INTERFACE_ONLY is zero, it means that we are responsible for
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1035 exporting definitions that others might need. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1036 short interface_only;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1037 short interface_unknown;
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1038 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1039
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1040 struct c_fileinfo *get_fileinfo (const char *);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1041 extern void dump_time_statistics (void);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1042
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1043 extern bool c_dump_tree (void *, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1044
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1045 extern void verify_sequence_points (tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1046
|
111
|
1047 extern tree fold_offsetof_1 (tree, tree_code ctx = ERROR_MARK);
|
|
1048 extern tree fold_offsetof (tree);
|
|
1049
|
|
1050 extern int complete_array_type (tree *, tree, bool);
|
|
1051
|
|
1052 extern tree builtin_type_for_size (int, bool);
|
|
1053
|
|
1054 extern void c_common_mark_addressable_vec (tree);
|
|
1055
|
|
1056 extern void set_underlying_type (tree);
|
|
1057 extern void record_types_used_by_current_var_decl (tree);
|
|
1058 extern vec<tree, va_gc> *make_tree_vector (void);
|
|
1059 extern void release_tree_vector (vec<tree, va_gc> *);
|
|
1060 extern vec<tree, va_gc> *make_tree_vector_single (tree);
|
|
1061 extern vec<tree, va_gc> *make_tree_vector_from_list (tree);
|
|
1062 extern vec<tree, va_gc> *make_tree_vector_from_ctor (tree);
|
|
1063 extern vec<tree, va_gc> *make_tree_vector_copy (const vec<tree, va_gc> *);
|
|
1064
|
|
1065 /* Used for communication between c_common_type_for_mode and
|
|
1066 c_register_builtin_type. */
|
|
1067 extern GTY(()) tree registered_builtin_types;
|
|
1068
|
|
1069 /* Read SOURCE_DATE_EPOCH from environment to have a deterministic
|
|
1070 timestamp to replace embedded current dates to get reproducible
|
|
1071 results. Returns -1 if SOURCE_DATE_EPOCH is not defined. */
|
|
1072 extern time_t cb_get_source_date_epoch (cpp_reader *pfile);
|
|
1073
|
|
1074 /* The value (as a unix timestamp) corresponds to date
|
|
1075 "Dec 31 9999 23:59:59 UTC", which is the latest date that __DATE__ and
|
|
1076 __TIME__ can store. */
|
|
1077 #define MAX_SOURCE_DATE_EPOCH HOST_WIDE_INT_C (253402300799)
|
|
1078
|
|
1079 /* Callback for libcpp for offering spelling suggestions for misspelled
|
|
1080 directives. */
|
|
1081 extern const char *cb_get_suggestion (cpp_reader *, const char *,
|
|
1082 const char *const *);
|
|
1083
|
|
1084 extern GTY(()) string_concat_db *g_string_concat_db;
|
|
1085
|
|
1086 class substring_loc;
|
|
1087 extern const char *c_get_substring_location (const substring_loc &substr_loc,
|
|
1088 location_t *out_loc);
|
|
1089
|
|
1090 /* In c-gimplify.c */
|
|
1091 extern void c_genericize (tree);
|
|
1092 extern int c_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
|
|
1093 extern tree c_build_bind_expr (location_t, tree, tree);
|
|
1094
|
|
1095 /* In c-lex.c. */
|
|
1096 extern enum cpp_ttype
|
|
1097 conflict_marker_get_final_tok_kind (enum cpp_ttype tok1_kind);
|
|
1098
|
|
1099 /* In c-pch.c */
|
|
1100 extern void pch_init (void);
|
|
1101 extern void pch_cpp_save_state (void);
|
|
1102 extern int c_common_valid_pch (cpp_reader *pfile, const char *name, int fd);
|
|
1103 extern void c_common_read_pch (cpp_reader *pfile, const char *name, int fd,
|
|
1104 const char *orig);
|
|
1105 extern void c_common_write_pch (void);
|
|
1106 extern void c_common_no_more_pch (void);
|
|
1107 extern void c_common_pch_pragma (cpp_reader *pfile, const char *);
|
|
1108
|
|
1109 /* In *-checksum.c */
|
|
1110 extern const unsigned char executable_checksum[16];
|
|
1111
|
|
1112 /* In c-cppbuiltin.c */
|
|
1113 extern void builtin_define_std (const char *macro);
|
|
1114 extern void builtin_define_with_value (const char *, const char *, int);
|
|
1115 extern void builtin_define_with_int_value (const char *, HOST_WIDE_INT);
|
|
1116 extern void builtin_define_type_sizeof (const char *, tree);
|
|
1117 extern void c_stddef_cpp_builtins (void);
|
|
1118 extern void fe_file_change (const line_map_ordinary *);
|
|
1119 extern void c_parse_error (const char *, enum cpp_ttype, tree, unsigned char,
|
|
1120 rich_location *richloc);
|
|
1121
|
|
1122 /* In c-ppoutput.c */
|
|
1123 extern void init_pp_output (FILE *);
|
|
1124 extern void preprocess_file (cpp_reader *);
|
|
1125 extern void pp_file_change (const line_map_ordinary *);
|
|
1126 extern void pp_dir_change (cpp_reader *, const char *);
|
|
1127 extern bool check_missing_format_attribute (tree, tree);
|
|
1128
|
|
1129 /* In c-omp.c */
|
|
1130 struct omp_clause_mask
|
|
1131 {
|
|
1132 inline omp_clause_mask ();
|
|
1133 inline omp_clause_mask (uint64_t l);
|
|
1134 inline omp_clause_mask (uint64_t l, uint64_t h);
|
|
1135 inline omp_clause_mask &operator &= (omp_clause_mask);
|
|
1136 inline omp_clause_mask &operator |= (omp_clause_mask);
|
|
1137 inline omp_clause_mask operator ~ () const;
|
|
1138 inline omp_clause_mask operator & (omp_clause_mask) const;
|
|
1139 inline omp_clause_mask operator | (omp_clause_mask) const;
|
|
1140 inline omp_clause_mask operator >> (int);
|
|
1141 inline omp_clause_mask operator << (int);
|
|
1142 inline bool operator == (omp_clause_mask) const;
|
|
1143 inline bool operator != (omp_clause_mask) const;
|
|
1144 uint64_t low, high;
|
|
1145 };
|
|
1146
|
|
1147 inline
|
|
1148 omp_clause_mask::omp_clause_mask ()
|
|
1149 {
|
|
1150 }
|
|
1151
|
|
1152 inline
|
|
1153 omp_clause_mask::omp_clause_mask (uint64_t l)
|
|
1154 : low (l), high (0)
|
|
1155 {
|
|
1156 }
|
|
1157
|
|
1158 inline
|
|
1159 omp_clause_mask::omp_clause_mask (uint64_t l, uint64_t h)
|
|
1160 : low (l), high (h)
|
|
1161 {
|
|
1162 }
|
|
1163
|
|
1164 inline omp_clause_mask &
|
|
1165 omp_clause_mask::operator &= (omp_clause_mask b)
|
|
1166 {
|
|
1167 low &= b.low;
|
|
1168 high &= b.high;
|
|
1169 return *this;
|
|
1170 }
|
|
1171
|
|
1172 inline omp_clause_mask &
|
|
1173 omp_clause_mask::operator |= (omp_clause_mask b)
|
|
1174 {
|
|
1175 low |= b.low;
|
|
1176 high |= b.high;
|
|
1177 return *this;
|
|
1178 }
|
|
1179
|
|
1180 inline omp_clause_mask
|
|
1181 omp_clause_mask::operator ~ () const
|
|
1182 {
|
|
1183 omp_clause_mask ret (~low, ~high);
|
|
1184 return ret;
|
|
1185 }
|
|
1186
|
|
1187 inline omp_clause_mask
|
|
1188 omp_clause_mask::operator | (omp_clause_mask b) const
|
|
1189 {
|
|
1190 omp_clause_mask ret (low | b.low, high | b.high);
|
|
1191 return ret;
|
|
1192 }
|
|
1193
|
|
1194 inline omp_clause_mask
|
|
1195 omp_clause_mask::operator & (omp_clause_mask b) const
|
|
1196 {
|
|
1197 omp_clause_mask ret (low & b.low, high & b.high);
|
|
1198 return ret;
|
|
1199 }
|
|
1200
|
|
1201 inline omp_clause_mask
|
|
1202 omp_clause_mask::operator << (int amount)
|
|
1203 {
|
|
1204 omp_clause_mask ret;
|
|
1205 if (amount >= 64)
|
|
1206 {
|
|
1207 ret.low = 0;
|
|
1208 ret.high = low << (amount - 64);
|
|
1209 }
|
|
1210 else if (amount == 0)
|
|
1211 ret = *this;
|
|
1212 else
|
|
1213 {
|
|
1214 ret.low = low << amount;
|
|
1215 ret.high = (low >> (64 - amount)) | (high << amount);
|
|
1216 }
|
|
1217 return ret;
|
|
1218 }
|
|
1219
|
|
1220 inline omp_clause_mask
|
|
1221 omp_clause_mask::operator >> (int amount)
|
|
1222 {
|
|
1223 omp_clause_mask ret;
|
|
1224 if (amount >= 64)
|
|
1225 {
|
|
1226 ret.low = high >> (amount - 64);
|
|
1227 ret.high = 0;
|
|
1228 }
|
|
1229 else if (amount == 0)
|
|
1230 ret = *this;
|
|
1231 else
|
|
1232 {
|
|
1233 ret.low = (high << (64 - amount)) | (low >> amount);
|
|
1234 ret.high = high >> amount;
|
|
1235 }
|
|
1236 return ret;
|
|
1237 }
|
|
1238
|
|
1239 inline bool
|
|
1240 omp_clause_mask::operator == (omp_clause_mask b) const
|
|
1241 {
|
|
1242 return low == b.low && high == b.high;
|
|
1243 }
|
|
1244
|
|
1245 inline bool
|
|
1246 omp_clause_mask::operator != (omp_clause_mask b) const
|
|
1247 {
|
|
1248 return low != b.low || high != b.high;
|
|
1249 }
|
|
1250
|
|
1251 #define OMP_CLAUSE_MASK_1 omp_clause_mask (1)
|
|
1252
|
|
1253 enum c_omp_clause_split
|
|
1254 {
|
|
1255 C_OMP_CLAUSE_SPLIT_TARGET = 0,
|
|
1256 C_OMP_CLAUSE_SPLIT_TEAMS,
|
|
1257 C_OMP_CLAUSE_SPLIT_DISTRIBUTE,
|
|
1258 C_OMP_CLAUSE_SPLIT_PARALLEL,
|
|
1259 C_OMP_CLAUSE_SPLIT_FOR,
|
|
1260 C_OMP_CLAUSE_SPLIT_SIMD,
|
|
1261 C_OMP_CLAUSE_SPLIT_COUNT,
|
|
1262 C_OMP_CLAUSE_SPLIT_SECTIONS = C_OMP_CLAUSE_SPLIT_FOR,
|
|
1263 C_OMP_CLAUSE_SPLIT_TASKLOOP = C_OMP_CLAUSE_SPLIT_FOR
|
|
1264 };
|
|
1265
|
|
1266 enum c_omp_region_type
|
|
1267 {
|
|
1268 C_ORT_OMP = 1 << 0,
|
|
1269 C_ORT_CILK = 1 << 1,
|
|
1270 C_ORT_ACC = 1 << 2,
|
|
1271 C_ORT_DECLARE_SIMD = 1 << 3,
|
|
1272 C_ORT_OMP_DECLARE_SIMD = C_ORT_OMP | C_ORT_DECLARE_SIMD
|
|
1273 };
|
|
1274
|
|
1275 extern tree c_finish_omp_master (location_t, tree);
|
|
1276 extern tree c_finish_omp_taskgroup (location_t, tree);
|
|
1277 extern tree c_finish_omp_critical (location_t, tree, tree, tree);
|
|
1278 extern tree c_finish_omp_ordered (location_t, tree, tree);
|
|
1279 extern void c_finish_omp_barrier (location_t);
|
|
1280 extern tree c_finish_omp_atomic (location_t, enum tree_code, enum tree_code,
|
|
1281 tree, tree, tree, tree, tree, bool, bool,
|
|
1282 bool = false);
|
|
1283 extern void c_finish_omp_flush (location_t);
|
|
1284 extern void c_finish_omp_taskwait (location_t);
|
|
1285 extern void c_finish_omp_taskyield (location_t);
|
|
1286 extern tree c_finish_omp_for (location_t, enum tree_code, tree, tree, tree,
|
|
1287 tree, tree, tree, tree);
|
|
1288 extern bool c_omp_check_loop_iv (tree, tree, walk_tree_lh);
|
|
1289 extern bool c_omp_check_loop_iv_exprs (location_t, tree, tree, tree, tree,
|
|
1290 walk_tree_lh);
|
|
1291 extern tree c_finish_oacc_wait (location_t, tree, tree);
|
|
1292 extern tree c_oacc_split_loop_clauses (tree, tree *, bool);
|
|
1293 extern void c_omp_split_clauses (location_t, enum tree_code, omp_clause_mask,
|
|
1294 tree, tree *);
|
|
1295 extern tree c_omp_declare_simd_clauses_to_numbers (tree, tree);
|
|
1296 extern void c_omp_declare_simd_clauses_to_decls (tree, tree);
|
|
1297 extern enum omp_clause_default_kind c_omp_predetermined_sharing (tree);
|
|
1298
|
|
1299 /* Return next tree in the chain for chain_next walking of tree nodes. */
|
|
1300 static inline tree
|
|
1301 c_tree_chain_next (tree t)
|
|
1302 {
|
|
1303 /* TREE_CHAIN of a type is TYPE_STUB_DECL, which is different
|
|
1304 kind of object, never a long chain of nodes. Prefer
|
|
1305 TYPE_NEXT_VARIANT for types. */
|
|
1306 if (CODE_CONTAINS_STRUCT (TREE_CODE (t), TS_TYPE_COMMON))
|
|
1307 return TYPE_NEXT_VARIANT (t);
|
|
1308 /* Otherwise, if there is TREE_CHAIN, return it. */
|
|
1309 if (CODE_CONTAINS_STRUCT (TREE_CODE (t), TS_COMMON))
|
|
1310 return TREE_CHAIN (t);
|
|
1311 return NULL;
|
|
1312 }
|
|
1313
|
|
1314 /* Mask used by tm_stmt_attr. */
|
|
1315 #define TM_STMT_ATTR_OUTER 2
|
|
1316 #define TM_STMT_ATTR_ATOMIC 4
|
|
1317 #define TM_STMT_ATTR_RELAXED 8
|
|
1318
|
|
1319 /* Mask used by tm_attr_to_mask and tm_mask_to_attr. Note that these
|
|
1320 are ordered specifically such that more restrictive attributes are
|
|
1321 at lower bit positions. This fact is known by the C++ tm attribute
|
|
1322 inheritance code such that least bit extraction (mask & -mask) results
|
|
1323 in the most restrictive attribute. */
|
|
1324 #define TM_ATTR_SAFE 1
|
|
1325 #define TM_ATTR_CALLABLE 2
|
|
1326 #define TM_ATTR_PURE 4
|
|
1327 #define TM_ATTR_IRREVOCABLE 8
|
|
1328 #define TM_ATTR_MAY_CANCEL_OUTER 16
|
|
1329
|
|
1330 /* A suffix-identifier value doublet that represents user-defined literals
|
|
1331 for C++-0x. */
|
|
1332 enum overflow_type {
|
|
1333 OT_UNDERFLOW = -1,
|
|
1334 OT_NONE,
|
|
1335 OT_OVERFLOW
|
|
1336 };
|
|
1337
|
|
1338 struct GTY(()) tree_userdef_literal {
|
|
1339 struct tree_base base;
|
|
1340 tree suffix_id;
|
|
1341 tree value;
|
|
1342 tree num_string;
|
|
1343 enum overflow_type overflow;
|
|
1344 };
|
|
1345
|
|
1346 #define USERDEF_LITERAL_SUFFIX_ID(NODE) \
|
|
1347 (((struct tree_userdef_literal *)USERDEF_LITERAL_CHECK (NODE))->suffix_id)
|
|
1348
|
|
1349 #define USERDEF_LITERAL_VALUE(NODE) \
|
|
1350 (((struct tree_userdef_literal *)USERDEF_LITERAL_CHECK (NODE))->value)
|
|
1351
|
|
1352 #define USERDEF_LITERAL_OVERFLOW(NODE) \
|
|
1353 (((struct tree_userdef_literal *)USERDEF_LITERAL_CHECK (NODE))->overflow)
|
|
1354
|
|
1355 #define USERDEF_LITERAL_NUM_STRING(NODE) \
|
|
1356 (((struct tree_userdef_literal *)USERDEF_LITERAL_CHECK (NODE))->num_string)
|
|
1357
|
|
1358 #define USERDEF_LITERAL_TYPE(NODE) \
|
|
1359 (TREE_TYPE (USERDEF_LITERAL_VALUE (NODE)))
|
|
1360
|
|
1361 extern tree build_userdef_literal (tree suffix_id, tree value,
|
|
1362 enum overflow_type overflow,
|
|
1363 tree num_string);
|
|
1364
|
|
1365 extern bool convert_vector_to_array_for_subscript (location_t, tree *, tree);
|
|
1366
|
|
1367 /* Possibe cases of scalar_to_vector conversion. */
|
|
1368 enum stv_conv {
|
|
1369 stv_error, /* Error occurred. */
|
|
1370 stv_nothing, /* Nothing happened. */
|
|
1371 stv_firstarg, /* First argument must be expanded. */
|
|
1372 stv_secondarg /* Second argument must be expanded. */
|
|
1373 };
|
|
1374
|
|
1375 extern enum stv_conv scalar_to_vector (location_t loc, enum tree_code code,
|
|
1376 tree op0, tree op1, bool);
|
|
1377
|
|
1378 /* In c-cilkplus.c */
|
|
1379 extern tree c_validate_cilk_plus_loop (tree *, int *, void *);
|
|
1380 extern bool c_check_cilk_loop (location_t, tree);
|
|
1381
|
|
1382 /* These #defines allow users to access different operands of the
|
|
1383 array notation tree. */
|
|
1384
|
|
1385 #define ARRAY_NOTATION_CHECK(NODE) TREE_CHECK (NODE, ARRAY_NOTATION_REF)
|
|
1386 #define ARRAY_NOTATION_ARRAY(NODE) \
|
|
1387 TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 0)
|
|
1388 #define ARRAY_NOTATION_START(NODE) \
|
|
1389 TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 1)
|
|
1390 #define ARRAY_NOTATION_LENGTH(NODE) \
|
|
1391 TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 2)
|
|
1392 #define ARRAY_NOTATION_STRIDE(NODE) \
|
|
1393 TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 3)
|
|
1394
|
|
1395 /* This structure holds all the scalar values and its appropriate variable
|
|
1396 replacment. It is mainly used by the function that pulls all the invariant
|
|
1397 parts that should be executed only once, which comes with array notation
|
|
1398 expressions. */
|
|
1399 struct inv_list
|
|
1400 {
|
|
1401 vec<tree, va_gc> *list_values;
|
|
1402 vec<tree, va_gc> *replacement;
|
|
1403 vec<enum tree_code, va_gc> *additional_tcodes;
|
|
1404 };
|
|
1405
|
|
1406 /* This structure holds all the important components that can be extracted
|
|
1407 from an ARRAY_NOTATION_REF expression. It is used to pass array notation
|
|
1408 information between the functions that are responsible for expansion. */
|
|
1409 typedef struct cilkplus_an_parts
|
|
1410 {
|
|
1411 tree value;
|
|
1412 tree start;
|
|
1413 tree length;
|
|
1414 tree stride;
|
|
1415 bool is_vector;
|
|
1416 } an_parts;
|
|
1417
|
|
1418 /* This structure holds the components necessary to create the loop around
|
|
1419 the ARRAY_REF that is created using the ARRAY_NOTATION information. */
|
|
1420
|
|
1421 typedef struct cilkplus_an_loop_parts
|
|
1422 {
|
|
1423 tree var; /* Loop induction variable. */
|
|
1424 tree incr; /* Loop increment/decrement expression. */
|
|
1425 tree cmp; /* Loop condition. */
|
|
1426 tree ind_init; /* Initialization of the loop induction variable. */
|
|
1427 } an_loop_parts;
|
|
1428
|
|
1429 /* In array-notation-common.c. */
|
|
1430 extern HOST_WIDE_INT extract_sec_implicit_index_arg (location_t, tree);
|
|
1431 extern bool is_sec_implicit_index_fn (tree);
|
|
1432 extern void array_notation_init_builtins (void);
|
|
1433 extern struct c_expr fix_array_notation_expr (location_t, enum tree_code,
|
|
1434 struct c_expr);
|
|
1435 extern bool contains_array_notation_expr (tree);
|
|
1436 extern tree expand_array_notation_exprs (tree);
|
|
1437 extern tree fix_conditional_array_notations (tree);
|
|
1438 extern tree find_correct_array_notation_type (tree);
|
|
1439 extern bool length_mismatch_in_expr_p (location_t, vec<vec<an_parts> >);
|
|
1440 extern enum built_in_function is_cilkplus_reduce_builtin (tree);
|
|
1441 extern bool find_rank (location_t, tree, tree, bool, size_t *);
|
|
1442 extern void extract_array_notation_exprs (tree, bool, vec<tree, va_gc> **);
|
|
1443 extern void replace_array_notations (tree *, bool, vec<tree, va_gc> *,
|
|
1444 vec<tree, va_gc> *);
|
|
1445 extern tree find_inv_trees (tree *, int *, void *);
|
|
1446 extern tree replace_inv_trees (tree *, int *, void *);
|
|
1447 extern tree find_correct_array_notation_type (tree op);
|
|
1448 extern void cilkplus_extract_an_triplets (vec<tree, va_gc> *, size_t, size_t,
|
|
1449 vec<vec<an_parts> > *);
|
|
1450 extern vec <tree, va_gc> *fix_sec_implicit_args
|
|
1451 (location_t, vec <tree, va_gc> *, vec<an_loop_parts>, size_t, tree);
|
|
1452 extern bool is_cilkplus_vector_p (tree);
|
|
1453
|
|
1454 /* In cilk.c. */
|
|
1455 extern tree insert_cilk_frame (tree);
|
|
1456 extern void cilk_init_builtins (void);
|
|
1457 extern int gimplify_cilk_spawn (tree *);
|
|
1458 extern void cilk_install_body_with_frame_cleanup (tree, tree, void *);
|
|
1459 extern bool cilk_detect_spawn_and_unwrap (tree *);
|
|
1460 extern bool cilk_set_spawn_marker (location_t, tree);
|
|
1461 extern tree build_cilk_sync (void);
|
|
1462 extern tree build_cilk_spawn (location_t, tree);
|
|
1463 extern tree make_cilk_frame (tree);
|
|
1464 extern tree create_cilk_function_exit (tree, bool, bool);
|
|
1465 extern void cilk_outline (tree, tree *, void *);
|
|
1466 extern bool contains_cilk_spawn_stmt (tree);
|
|
1467 extern tree cilk_for_number_of_iterations (tree);
|
|
1468 extern bool check_no_cilk (tree, const char *, const char *,
|
|
1469 location_t loc = UNKNOWN_LOCATION);
|
|
1470 extern bool reject_gcc_builtin (const_tree, location_t = UNKNOWN_LOCATION);
|
|
1471 extern bool valid_array_size_p (location_t, tree, tree);
|
|
1472
|
|
1473 extern bool cilk_ignorable_spawn_rhs_op (tree);
|
|
1474 extern bool cilk_recognize_spawn (tree, tree *);
|
|
1475
|
|
1476 /* In c-warn.c. */
|
|
1477 extern void constant_expression_warning (tree);
|
|
1478 extern void constant_expression_error (tree);
|
|
1479 extern void overflow_warning (location_t, tree, tree = NULL_TREE);
|
|
1480 extern void warn_logical_operator (location_t, enum tree_code, tree,
|
|
1481 enum tree_code, tree, enum tree_code, tree);
|
|
1482 extern void warn_tautological_cmp (location_t, enum tree_code, tree, tree);
|
|
1483 extern void warn_logical_not_parentheses (location_t, enum tree_code, tree,
|
|
1484 tree);
|
|
1485 extern bool warn_if_unused_value (const_tree, location_t);
|
|
1486 extern bool strict_aliasing_warning (tree, tree, tree);
|
|
1487 extern void sizeof_pointer_memaccess_warning (location_t *, tree,
|
|
1488 vec<tree, va_gc> *, tree *,
|
|
1489 bool (*) (tree, tree));
|
|
1490 extern void check_main_parameter_types (tree decl);
|
|
1491 extern void warnings_for_convert_and_check (location_t, tree, tree, tree);
|
|
1492 extern void c_do_switch_warnings (splay_tree, location_t, tree, tree, bool,
|
|
1493 bool);
|
|
1494 extern void warn_for_omitted_condop (location_t, tree);
|
|
1495 extern void warn_for_restrict (unsigned, tree *, unsigned);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1496
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1497 /* Places where an lvalue, or modifiable lvalue, may be required.
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1498 Used to select diagnostic messages in lvalue_error and
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1499 readonly_error. */
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1500 enum lvalue_use {
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1501 lv_assign,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1502 lv_increment,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1503 lv_decrement,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1504 lv_addressof,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1505 lv_asm
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1506 };
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1507
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1508 extern void lvalue_error (location_t, enum lvalue_use);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1509 extern void invalid_indirection_error (location_t, tree, ref_operator);
|
111
|
1510 extern void readonly_error (location_t, tree, enum lvalue_use);
|
|
1511 extern void warn_array_subscript_with_type_char (location_t, tree);
|
|
1512 extern void warn_about_parentheses (location_t,
|
|
1513 enum tree_code,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1514 enum tree_code, tree,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1515 enum tree_code, tree);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1516 extern void warn_for_unused_label (tree label);
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1517 extern void warn_for_div_by_zero (location_t, tree divisor);
|
111
|
1518 extern void warn_for_memset (location_t, tree, tree, int);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1519 extern void warn_for_sign_compare (location_t,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1520 tree orig_op0, tree orig_op1,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1521 tree op0, tree op1,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1522 tree result_type,
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1523 enum tree_code resultcode);
|
111
|
1524 extern void do_warn_double_promotion (tree, tree, tree, const char *,
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1525 location_t);
|
111
|
1526 extern void do_warn_unused_parameter (tree);
|
|
1527 extern void record_locally_defined_typedef (tree);
|
|
1528 extern void maybe_record_typedef_use (tree);
|
|
1529 extern void maybe_warn_unused_local_typedefs (void);
|
|
1530 extern void maybe_warn_bool_compare (location_t, enum tree_code, tree, tree);
|
|
1531 extern bool maybe_warn_shift_overflow (location_t, tree, tree);
|
|
1532 extern void warn_duplicated_cond_add_or_warn (location_t, tree, vec<tree> **);
|
|
1533 extern bool diagnose_mismatched_attributes (tree, tree);
|
|
1534 extern tree do_warn_duplicated_branches_r (tree *, int *, void *);
|
|
1535 extern void warn_for_multistatement_macros (location_t, location_t,
|
|
1536 location_t, enum rid);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1537
|
111
|
1538 /* In c-attribs.c. */
|
|
1539 extern bool attribute_takes_identifier_p (const_tree);
|
|
1540 extern tree handle_unused_attribute (tree *, tree, tree, int, bool *);
|
|
1541 extern int parse_tm_stmt_attr (tree, int);
|
|
1542 extern int tm_attr_to_mask (tree);
|
|
1543 extern tree tm_mask_to_attr (int);
|
|
1544 extern tree find_tm_attribute (tree);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1545
|
111
|
1546 extern enum flt_eval_method
|
|
1547 excess_precision_mode_join (enum flt_eval_method, enum flt_eval_method);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1548
|
111
|
1549 extern int c_flt_eval_method (bool ts18661_p);
|
|
1550 extern void add_no_sanitize_value (tree node, unsigned int flags);
|
|
1551
|
|
1552 extern void maybe_add_include_fixit (rich_location *, const char *);
|
|
1553 extern void maybe_suggest_missing_token_insertion (rich_location *richloc,
|
|
1554 enum cpp_ttype token_type,
|
|
1555 location_t prev_token_loc);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1556
|
111
|
1557 #if CHECKING_P
|
|
1558 namespace selftest {
|
|
1559 /* Declarations for specific families of tests within c-family,
|
|
1560 by source file, in alphabetical order. */
|
|
1561 extern void c_format_c_tests (void);
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1562
|
111
|
1563 /* The entrypoint for running all of the above tests. */
|
|
1564 extern void c_family_tests (void);
|
|
1565 } // namespace selftest
|
|
1566 #endif /* #if CHECKING_P */
|
68
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1567
|
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1568 #endif /* ! GCC_C_COMMON_H */
|