]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/flag-types.h
Clean up fallout on ILP32 from r229831.
[thirdparty/gcc.git] / gcc / flag-types.h
CommitLineData
f938f60c 1/* Compilation switch flag type definitions for GCC.
5624e564 2 Copyright (C) 1987-2015 Free Software Foundation, Inc.
f938f60c
JM
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20#ifndef GCC_FLAG_TYPES_H
21#define GCC_FLAG_TYPES_H
22
23enum debug_info_type
24{
25 NO_DEBUG, /* Write no debug info. */
26 DBX_DEBUG, /* Write BSD .stabs for DBX (using dbxout.c). */
27 SDB_DEBUG, /* Write COFF for (old) SDB (using sdbout.c). */
28 DWARF2_DEBUG, /* Write Dwarf v2 debug info (using dwarf2out.c). */
29 XCOFF_DEBUG, /* Write IBM/Xcoff debug info (using dbxout.c). */
30 VMS_DEBUG, /* Write VMS debug info (using vmsdbgout.c). */
31 VMS_AND_DWARF2_DEBUG /* Write VMS debug info (using vmsdbgout.c).
32 and DWARF v2 debug info (using dwarf2out.c). */
33};
34
0576d21f 35enum debug_info_levels
f938f60c
JM
36{
37 DINFO_LEVEL_NONE, /* Write no debugging info. */
38 DINFO_LEVEL_TERSE, /* Write minimal info to support tracebacks only. */
39 DINFO_LEVEL_NORMAL, /* Write info for all declarations (and line table). */
40 DINFO_LEVEL_VERBOSE /* Write normal info plus #define/#undef info. */
41};
42
43/* A major contribution to object and executable size is debug
44 information size. A major contribution to debug information
45 size is struct descriptions replicated in several object files.
46 The following function determines whether or not debug information
47 should be generated for a given struct. The indirect parameter
48 indicates that the struct is being handled indirectly, via
49 a pointer. See opts.c for the implementation. */
50
51enum debug_info_usage
52{
53 DINFO_USAGE_DFN, /* A struct definition. */
54 DINFO_USAGE_DIR_USE, /* A direct use, such as the type of a variable. */
55 DINFO_USAGE_IND_USE, /* An indirect use, such as through a pointer. */
56 DINFO_USAGE_NUM_ENUMS /* The number of enumerators. */
57};
58
69ccdddb
JM
59/* A major contribution to object and executable size is debug
60 information size. A major contribution to debug information size
61 is struct descriptions replicated in several object files. The
62 following flags attempt to reduce this information. The basic
63 idea is to not emit struct debugging information in the current
64 compilation unit when that information will be generated by
65 another compilation unit.
66
67 Debug information for a struct defined in the current source
68 file should be generated in the object file. Likewise the
69 debug information for a struct defined in a header should be
70 generated in the object file of the corresponding source file.
71 Both of these case are handled when the base name of the file of
72 the struct definition matches the base name of the source file
73 of the current compilation unit. This matching emits minimal
74 struct debugging information.
75
76 The base file name matching rule above will fail to emit debug
77 information for structs defined in system headers. So a second
78 category of files includes system headers in addition to files
79 with matching bases.
80
81 The remaining types of files are library headers and application
82 headers. We cannot currently distinguish these two types. */
83
84enum debug_struct_file
85{
86 DINFO_STRUCT_FILE_NONE, /* Debug no structs. */
87 DINFO_STRUCT_FILE_BASE, /* Debug structs defined in files with the
88 same base name as the compilation unit. */
89 DINFO_STRUCT_FILE_SYS, /* Also debug structs defined in system
90 header files. */
91 DINFO_STRUCT_FILE_ANY /* Debug structs defined in all files. */
92};
93
dcaaa5a0
DP
94/* Enumerate Objective-c instance variable visibility settings. */
95
96enum ivar_visibility
97{
98 IVAR_VISIBILITY_PRIVATE,
99 IVAR_VISIBILITY_PROTECTED,
100 IVAR_VISIBILITY_PUBLIC,
101 IVAR_VISIBILITY_PACKAGE
102};
103
87e2a8fd
XDL
104/* The stack reuse level. */
105enum stack_reuse_level
106{
107 SR_NONE,
108 SR_NAMED_VARS,
109 SR_ALL
110};
111
59faab7c
SB
112/* The algorithm used for basic block reordering. */
113enum reorder_blocks_algorithm
114{
115 REORDER_BLOCKS_ALGORITHM_SIMPLE,
116 REORDER_BLOCKS_ALGORITHM_STC
117};
118
f938f60c
JM
119/* The algorithm used for the integrated register allocator (IRA). */
120enum ira_algorithm
121{
122 IRA_ALGORITHM_CB,
123 IRA_ALGORITHM_PRIORITY
124};
125
126/* The regions used for the integrated register allocator (IRA). */
127enum ira_region
128{
129 IRA_REGION_ONE,
130 IRA_REGION_ALL,
ffe8727f
VM
131 IRA_REGION_MIXED,
132 /* This value means that there were no options -fira-region on the
133 command line and that we should choose a value depending on the
134 used -O option. */
135 IRA_REGION_AUTODETECT
f938f60c
JM
136};
137
138/* The options for excess precision. */
139enum excess_precision
140{
141 EXCESS_PRECISION_DEFAULT,
142 EXCESS_PRECISION_FAST,
143 EXCESS_PRECISION_STANDARD
144};
145
f938f60c
JM
146/* Type of stack check. */
147enum stack_check_type
148{
149 /* Do not check the stack. */
150 NO_STACK_CHECK = 0,
151
152 /* Check the stack generically, i.e. assume no specific support
153 from the target configuration files. */
154 GENERIC_STACK_CHECK,
155
156 /* Check the stack and rely on the target configuration files to
157 check the static frame of functions, i.e. use the generic
158 mechanism only for dynamic stack allocations. */
159 STATIC_BUILTIN_STACK_CHECK,
160
161 /* Check the stack and entirely rely on the target configuration
162 files, i.e. do not use the generic mechanism at all. */
163 FULL_BUILTIN_STACK_CHECK
164};
165
166/* Names for the different levels of -Wstrict-overflow=N. The numeric
167 values here correspond to N. */
168
169enum warn_strict_overflow_code
170{
171 /* Overflow warning that should be issued with -Wall: a questionable
172 construct that is easy to avoid even when using macros. Example:
173 folding (x + CONSTANT > x) to 1. */
174 WARN_STRICT_OVERFLOW_ALL = 1,
175 /* Overflow warning about folding a comparison to a constant because
176 of undefined signed overflow, other than cases covered by
177 WARN_STRICT_OVERFLOW_ALL. Example: folding (abs (x) >= 0) to 1
178 (this is false when x == INT_MIN). */
179 WARN_STRICT_OVERFLOW_CONDITIONAL = 2,
180 /* Overflow warning about changes to comparisons other than folding
181 them to a constant. Example: folding (x + 1 > 1) to (x > 0). */
182 WARN_STRICT_OVERFLOW_COMPARISON = 3,
183 /* Overflow warnings not covered by the above cases. Example:
184 folding ((x * 10) / 5) to (x * 2). */
185 WARN_STRICT_OVERFLOW_MISC = 4,
186 /* Overflow warnings about reducing magnitude of constants in
187 comparison. Example: folding (x + 2 > y) to (x + 1 >= y). */
188 WARN_STRICT_OVERFLOW_MAGNITUDE = 5
189};
190
16949072
RG
191/* Floating-point contraction mode. */
192enum fp_contract_mode {
193 FP_CONTRACT_OFF = 0,
194 FP_CONTRACT_ON = 1,
195 FP_CONTRACT_FAST = 2
196};
197
d6d11272
XDL
198/* Vectorizer cost-model. */
199enum vect_cost_model {
200 VECT_COST_MODEL_UNLIMITED = 0,
201 VECT_COST_MODEL_CHEAP = 1,
202 VECT_COST_MODEL_DYNAMIC = 2,
203 VECT_COST_MODEL_DEFAULT = 3
204};
205
206
de5a5fa1
MP
207/* Different instrumentation modes. */
208enum sanitize_code {
209 /* AddressSanitizer. */
210 SANITIZE_ADDRESS = 1 << 0,
fec4842d
YG
211 SANITIZE_USER_ADDRESS = 1 << 1,
212 SANITIZE_KERNEL_ADDRESS = 1 << 2,
de5a5fa1 213 /* ThreadSanitizer. */
fec4842d 214 SANITIZE_THREAD = 1 << 3,
9065ada9 215 /* LeakSanitizer. */
fec4842d 216 SANITIZE_LEAK = 1 << 4,
de5a5fa1 217 /* UndefinedBehaviorSanitizer. */
fec4842d
YG
218 SANITIZE_SHIFT = 1 << 5,
219 SANITIZE_DIVIDE = 1 << 6,
220 SANITIZE_UNREACHABLE = 1 << 7,
221 SANITIZE_VLA = 1 << 8,
222 SANITIZE_NULL = 1 << 9,
223 SANITIZE_RETURN = 1 << 10,
224 SANITIZE_SI_OVERFLOW = 1 << 11,
225 SANITIZE_BOOL = 1 << 12,
226 SANITIZE_ENUM = 1 << 13,
227 SANITIZE_FLOAT_DIVIDE = 1 << 14,
228 SANITIZE_FLOAT_CAST = 1 << 15,
8c0f0118
DD
229 SANITIZE_BOUNDS = 1UL << 16,
230 SANITIZE_ALIGNMENT = 1UL << 17,
231 SANITIZE_NONNULL_ATTRIBUTE = 1UL << 18,
232 SANITIZE_RETURNS_NONNULL_ATTRIBUTE = 1UL << 19,
233 SANITIZE_OBJECT_SIZE = 1UL << 20,
35228ac7 234 SANITIZE_VPTR = 1UL << 21,
e0f0d3b9 235 SANITIZE_BOUNDS_STRICT = 1UL << 22,
de5a5fa1 236 SANITIZE_UNDEFINED = SANITIZE_SHIFT | SANITIZE_DIVIDE | SANITIZE_UNREACHABLE
0a508bb6 237 | SANITIZE_VLA | SANITIZE_NULL | SANITIZE_RETURN
0e37a2f3 238 | SANITIZE_SI_OVERFLOW | SANITIZE_BOOL | SANITIZE_ENUM
126edc3f
JJ
239 | SANITIZE_BOUNDS | SANITIZE_ALIGNMENT
240 | SANITIZE_NONNULL_ATTRIBUTE
0e82f089 241 | SANITIZE_RETURNS_NONNULL_ATTRIBUTE
35228ac7 242 | SANITIZE_OBJECT_SIZE | SANITIZE_VPTR,
85a16bf8 243 SANITIZE_NONDEFAULT = SANITIZE_FLOAT_DIVIDE | SANITIZE_FLOAT_CAST
e0f0d3b9 244 | SANITIZE_BOUNDS_STRICT
de5a5fa1
MP
245};
246
2077db1b
CT
247/* flag_vtable_verify initialization levels. */
248enum vtv_priority {
249 VTV_NO_PRIORITY = 0, /* i.E. Do NOT do vtable verification. */
250 VTV_STANDARD_PRIORITY = 1,
251 VTV_PREINIT_PRIORITY = 2
252};
783dab6b
RB
253
254/* flag_lto_partition initialization values. */
255enum lto_partition_model {
256 LTO_PARTITION_NONE = 0,
257 LTO_PARTITION_ONE = 1,
258 LTO_PARTITION_BALANCED = 2,
259 LTO_PARTITION_1TO1 = 3,
260 LTO_PARTITION_MAX = 4
261};
262
f19626cf
TB
263
264/* gfortran -finit-real= values. */
265
266enum gfc_init_local_real
267{
268 GFC_INIT_REAL_OFF = 0,
269 GFC_INIT_REAL_ZERO,
270 GFC_INIT_REAL_NAN,
271 GFC_INIT_REAL_SNAN,
272 GFC_INIT_REAL_INF,
273 GFC_INIT_REAL_NEG_INF
274};
275
276/* gfortran -fcoarray= values. */
277
278enum gfc_fcoarray
279{
280 GFC_FCOARRAY_NONE = 0,
281 GFC_FCOARRAY_SINGLE,
282 GFC_FCOARRAY_LIB
283};
284
285
286/* gfortran -fconvert= values; used for unformatted I/O.
287 Keep in sync with GFC_CONVERT_* in gcc/fortran/libgfortran.h. */
288enum gfc_convert
289{
290 GFC_FLAG_CONVERT_NATIVE = 0,
291 GFC_FLAG_CONVERT_SWAP,
292 GFC_FLAG_CONVERT_BIG,
293 GFC_FLAG_CONVERT_LITTLE
294};
295
296
f938f60c 297#endif /* ! GCC_FLAG_TYPES_H */