annotate gcc/c-family/c-common.h @ 127:4c56639505ff

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