1 /* Compilation switch flag type definitions for GCC.
2 Copyright (C) 1987-2015 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 #ifndef GCC_FLAG_TYPES_H
21 #define GCC_FLAG_TYPES_H
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). */
35 enum debug_info_levels
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. */
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. */
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. */
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.
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.
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
81 The remaining types of files are library headers and application
82 headers. We cannot currently distinguish these two types. */
84 enum debug_struct_file
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
91 DINFO_STRUCT_FILE_ANY
/* Debug structs defined in all files. */
94 /* Enumerate visibility settings. This is deliberately ordered from most
95 to least visibility. */
96 #ifndef SYMBOL_VISIBILITY_DEFINED
97 #define SYMBOL_VISIBILITY_DEFINED
98 enum symbol_visibility
101 VISIBILITY_PROTECTED
,
107 /* Enumerate Objective-c instance variable visibility settings. */
111 IVAR_VISIBILITY_PRIVATE
,
112 IVAR_VISIBILITY_PROTECTED
,
113 IVAR_VISIBILITY_PUBLIC
,
114 IVAR_VISIBILITY_PACKAGE
117 /* The stack reuse level. */
118 enum stack_reuse_level
125 /* The algorithm used for the integrated register allocator (IRA). */
129 IRA_ALGORITHM_PRIORITY
132 /* The regions used for the integrated register allocator (IRA). */
138 /* This value means that there were no options -fira-region on the
139 command line and that we should choose a value depending on the
141 IRA_REGION_AUTODETECT
144 /* The options for excess precision. */
145 enum excess_precision
147 EXCESS_PRECISION_DEFAULT
,
148 EXCESS_PRECISION_FAST
,
149 EXCESS_PRECISION_STANDARD
152 /* Type of stack check. */
153 enum stack_check_type
155 /* Do not check the stack. */
158 /* Check the stack generically, i.e. assume no specific support
159 from the target configuration files. */
162 /* Check the stack and rely on the target configuration files to
163 check the static frame of functions, i.e. use the generic
164 mechanism only for dynamic stack allocations. */
165 STATIC_BUILTIN_STACK_CHECK
,
167 /* Check the stack and entirely rely on the target configuration
168 files, i.e. do not use the generic mechanism at all. */
169 FULL_BUILTIN_STACK_CHECK
172 /* Names for the different levels of -Wstrict-overflow=N. The numeric
173 values here correspond to N. */
175 enum warn_strict_overflow_code
177 /* Overflow warning that should be issued with -Wall: a questionable
178 construct that is easy to avoid even when using macros. Example:
179 folding (x + CONSTANT > x) to 1. */
180 WARN_STRICT_OVERFLOW_ALL
= 1,
181 /* Overflow warning about folding a comparison to a constant because
182 of undefined signed overflow, other than cases covered by
183 WARN_STRICT_OVERFLOW_ALL. Example: folding (abs (x) >= 0) to 1
184 (this is false when x == INT_MIN). */
185 WARN_STRICT_OVERFLOW_CONDITIONAL
= 2,
186 /* Overflow warning about changes to comparisons other than folding
187 them to a constant. Example: folding (x + 1 > 1) to (x > 0). */
188 WARN_STRICT_OVERFLOW_COMPARISON
= 3,
189 /* Overflow warnings not covered by the above cases. Example:
190 folding ((x * 10) / 5) to (x * 2). */
191 WARN_STRICT_OVERFLOW_MISC
= 4,
192 /* Overflow warnings about reducing magnitude of constants in
193 comparison. Example: folding (x + 2 > y) to (x + 1 >= y). */
194 WARN_STRICT_OVERFLOW_MAGNITUDE
= 5
197 /* Floating-point contraction mode. */
198 enum fp_contract_mode
{
204 /* Vectorizer cost-model. */
205 enum vect_cost_model
{
206 VECT_COST_MODEL_UNLIMITED
= 0,
207 VECT_COST_MODEL_CHEAP
= 1,
208 VECT_COST_MODEL_DYNAMIC
= 2,
209 VECT_COST_MODEL_DEFAULT
= 3
213 /* Different instrumentation modes. */
215 /* AddressSanitizer. */
216 SANITIZE_ADDRESS
= 1 << 0,
217 SANITIZE_USER_ADDRESS
= 1 << 1,
218 SANITIZE_KERNEL_ADDRESS
= 1 << 2,
219 /* ThreadSanitizer. */
220 SANITIZE_THREAD
= 1 << 3,
222 SANITIZE_LEAK
= 1 << 4,
223 /* UndefinedBehaviorSanitizer. */
224 SANITIZE_SHIFT
= 1 << 5,
225 SANITIZE_DIVIDE
= 1 << 6,
226 SANITIZE_UNREACHABLE
= 1 << 7,
227 SANITIZE_VLA
= 1 << 8,
228 SANITIZE_NULL
= 1 << 9,
229 SANITIZE_RETURN
= 1 << 10,
230 SANITIZE_SI_OVERFLOW
= 1 << 11,
231 SANITIZE_BOOL
= 1 << 12,
232 SANITIZE_ENUM
= 1 << 13,
233 SANITIZE_FLOAT_DIVIDE
= 1 << 14,
234 SANITIZE_FLOAT_CAST
= 1 << 15,
235 SANITIZE_BOUNDS
= 1UL << 16,
236 SANITIZE_ALIGNMENT
= 1UL << 17,
237 SANITIZE_NONNULL_ATTRIBUTE
= 1UL << 18,
238 SANITIZE_RETURNS_NONNULL_ATTRIBUTE
= 1UL << 19,
239 SANITIZE_OBJECT_SIZE
= 1UL << 20,
240 SANITIZE_VPTR
= 1UL << 21,
241 SANITIZE_BOUNDS_STRICT
= 1UL << 22,
242 SANITIZE_UNDEFINED
= SANITIZE_SHIFT
| SANITIZE_DIVIDE
| SANITIZE_UNREACHABLE
243 | SANITIZE_VLA
| SANITIZE_NULL
| SANITIZE_RETURN
244 | SANITIZE_SI_OVERFLOW
| SANITIZE_BOOL
| SANITIZE_ENUM
245 | SANITIZE_BOUNDS
| SANITIZE_ALIGNMENT
246 | SANITIZE_NONNULL_ATTRIBUTE
247 | SANITIZE_RETURNS_NONNULL_ATTRIBUTE
248 | SANITIZE_OBJECT_SIZE
| SANITIZE_VPTR
,
249 SANITIZE_NONDEFAULT
= SANITIZE_FLOAT_DIVIDE
| SANITIZE_FLOAT_CAST
250 | SANITIZE_BOUNDS_STRICT
253 /* flag_vtable_verify initialization levels. */
255 VTV_NO_PRIORITY
= 0, /* i.E. Do NOT do vtable verification. */
256 VTV_STANDARD_PRIORITY
= 1,
257 VTV_PREINIT_PRIORITY
= 2
260 /* flag_lto_partition initialization values. */
261 enum lto_partition_model
{
262 LTO_PARTITION_NONE
= 0,
263 LTO_PARTITION_ONE
= 1,
264 LTO_PARTITION_BALANCED
= 2,
265 LTO_PARTITION_1TO1
= 3,
266 LTO_PARTITION_MAX
= 4
270 /* gfortran -finit-real= values. */
272 enum gfc_init_local_real
274 GFC_INIT_REAL_OFF
= 0,
279 GFC_INIT_REAL_NEG_INF
282 /* gfortran -fcoarray= values. */
286 GFC_FCOARRAY_NONE
= 0,
292 /* gfortran -fconvert= values; used for unformatted I/O.
293 Keep in sync with GFC_CONVERT_* in gcc/fortran/libgfortran.h. */
296 GFC_FLAG_CONVERT_NATIVE
= 0,
297 GFC_FLAG_CONVERT_SWAP
,
298 GFC_FLAG_CONVERT_BIG
,
299 GFC_FLAG_CONVERT_LITTLE
303 #endif /* ! GCC_FLAG_TYPES_H */