PR c++/84454 - ICE with pack expansion in signature.
[official-gcc.git] / gcc / flag-types.h
blob7f79da79db01d556a6b93e64ed80b11aaa3e0c88
1 /* Compilation switch flag type definitions for GCC.
2 Copyright (C) 1987-2018 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
9 version.
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
14 for more details.
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
23 enum debug_info_type
25 NO_DEBUG, /* Write no debug info. */
26 DBX_DEBUG, /* Write BSD .stabs for DBX (using dbxout.c). */
27 DWARF2_DEBUG, /* Write Dwarf v2 debug info (using dwarf2out.c). */
28 XCOFF_DEBUG, /* Write IBM/Xcoff debug info (using dbxout.c). */
29 VMS_DEBUG, /* Write VMS debug info (using vmsdbgout.c). */
30 VMS_AND_DWARF2_DEBUG /* Write VMS debug info (using vmsdbgout.c).
31 and DWARF v2 debug info (using dwarf2out.c). */
34 enum debug_info_levels
36 DINFO_LEVEL_NONE, /* Write no debugging info. */
37 DINFO_LEVEL_TERSE, /* Write minimal info to support tracebacks only. */
38 DINFO_LEVEL_NORMAL, /* Write info for all declarations (and line table). */
39 DINFO_LEVEL_VERBOSE /* Write normal info plus #define/#undef info. */
42 /* A major contribution to object and executable size is debug
43 information size. A major contribution to debug information
44 size is struct descriptions replicated in several object files.
45 The following function determines whether or not debug information
46 should be generated for a given struct. The indirect parameter
47 indicates that the struct is being handled indirectly, via
48 a pointer. See opts.c for the implementation. */
50 enum debug_info_usage
52 DINFO_USAGE_DFN, /* A struct definition. */
53 DINFO_USAGE_DIR_USE, /* A direct use, such as the type of a variable. */
54 DINFO_USAGE_IND_USE, /* An indirect use, such as through a pointer. */
55 DINFO_USAGE_NUM_ENUMS /* The number of enumerators. */
58 /* A major contribution to object and executable size is debug
59 information size. A major contribution to debug information size
60 is struct descriptions replicated in several object files. The
61 following flags attempt to reduce this information. The basic
62 idea is to not emit struct debugging information in the current
63 compilation unit when that information will be generated by
64 another compilation unit.
66 Debug information for a struct defined in the current source
67 file should be generated in the object file. Likewise the
68 debug information for a struct defined in a header should be
69 generated in the object file of the corresponding source file.
70 Both of these case are handled when the base name of the file of
71 the struct definition matches the base name of the source file
72 of the current compilation unit. This matching emits minimal
73 struct debugging information.
75 The base file name matching rule above will fail to emit debug
76 information for structs defined in system headers. So a second
77 category of files includes system headers in addition to files
78 with matching bases.
80 The remaining types of files are library headers and application
81 headers. We cannot currently distinguish these two types. */
83 enum debug_struct_file
85 DINFO_STRUCT_FILE_NONE, /* Debug no structs. */
86 DINFO_STRUCT_FILE_BASE, /* Debug structs defined in files with the
87 same base name as the compilation unit. */
88 DINFO_STRUCT_FILE_SYS, /* Also debug structs defined in system
89 header files. */
90 DINFO_STRUCT_FILE_ANY /* Debug structs defined in all files. */
93 /* Balance between GNAT encodings and standard DWARF to emit. */
95 enum dwarf_gnat_encodings
97 DWARF_GNAT_ENCODINGS_ALL = 0, /* Emit all GNAT encodings, then emit as
98 much standard DWARF as possible so it
99 does not conflict with GNAT
100 encodings. */
101 DWARF_GNAT_ENCODINGS_GDB = 1, /* Emit as much standard DWARF as possible
102 as long as GDB handles them. Emit GNAT
103 encodings for the rest. */
104 DWARF_GNAT_ENCODINGS_MINIMAL = 2 /* Emit all the standard DWARF we can.
105 Emit GNAT encodings for the rest. */
108 /* Enumerate Objective-c instance variable visibility settings. */
110 enum ivar_visibility
112 IVAR_VISIBILITY_PRIVATE,
113 IVAR_VISIBILITY_PROTECTED,
114 IVAR_VISIBILITY_PUBLIC,
115 IVAR_VISIBILITY_PACKAGE
118 /* The stack reuse level. */
119 enum stack_reuse_level
121 SR_NONE,
122 SR_NAMED_VARS,
123 SR_ALL
126 /* The algorithm used for basic block reordering. */
127 enum reorder_blocks_algorithm
129 REORDER_BLOCKS_ALGORITHM_SIMPLE,
130 REORDER_BLOCKS_ALGORITHM_STC
133 /* The algorithm used for the integrated register allocator (IRA). */
134 enum ira_algorithm
136 IRA_ALGORITHM_CB,
137 IRA_ALGORITHM_PRIORITY
140 /* The regions used for the integrated register allocator (IRA). */
141 enum ira_region
143 IRA_REGION_ONE,
144 IRA_REGION_ALL,
145 IRA_REGION_MIXED,
146 /* This value means that there were no options -fira-region on the
147 command line and that we should choose a value depending on the
148 used -O option. */
149 IRA_REGION_AUTODETECT
152 /* The options for excess precision. */
153 enum excess_precision
155 EXCESS_PRECISION_DEFAULT,
156 EXCESS_PRECISION_FAST,
157 EXCESS_PRECISION_STANDARD
160 /* The options for which values of FLT_EVAL_METHOD are permissible. */
161 enum permitted_flt_eval_methods
163 PERMITTED_FLT_EVAL_METHODS_DEFAULT,
164 PERMITTED_FLT_EVAL_METHODS_TS_18661,
165 PERMITTED_FLT_EVAL_METHODS_C11
168 /* Type of stack check.
170 Stack checking is designed to detect infinite recursion and stack
171 overflows for Ada programs. Furthermore stack checking tries to ensure
172 in that scenario that enough stack space is left to run a signal handler.
174 -fstack-check= does not prevent stack-clash style attacks. For that
175 you want -fstack-clash-protection. */
176 enum stack_check_type
178 /* Do not check the stack. */
179 NO_STACK_CHECK = 0,
181 /* Check the stack generically, i.e. assume no specific support
182 from the target configuration files. */
183 GENERIC_STACK_CHECK,
185 /* Check the stack and rely on the target configuration files to
186 check the static frame of functions, i.e. use the generic
187 mechanism only for dynamic stack allocations. */
188 STATIC_BUILTIN_STACK_CHECK,
190 /* Check the stack and entirely rely on the target configuration
191 files, i.e. do not use the generic mechanism at all. */
192 FULL_BUILTIN_STACK_CHECK
195 /* Floating-point contraction mode. */
196 enum fp_contract_mode {
197 FP_CONTRACT_OFF = 0,
198 FP_CONTRACT_ON = 1,
199 FP_CONTRACT_FAST = 2
202 /* Scalar storage order kind. */
203 enum scalar_storage_order_kind {
204 SSO_NATIVE = 0,
205 SSO_BIG_ENDIAN,
206 SSO_LITTLE_ENDIAN
209 /* Vectorizer cost-model. */
210 enum vect_cost_model {
211 VECT_COST_MODEL_UNLIMITED = 0,
212 VECT_COST_MODEL_CHEAP = 1,
213 VECT_COST_MODEL_DYNAMIC = 2,
214 VECT_COST_MODEL_DEFAULT = 3
217 /* Different instrumentation modes. */
218 enum sanitize_code {
219 /* AddressSanitizer. */
220 SANITIZE_ADDRESS = 1UL << 0,
221 SANITIZE_USER_ADDRESS = 1UL << 1,
222 SANITIZE_KERNEL_ADDRESS = 1UL << 2,
223 /* ThreadSanitizer. */
224 SANITIZE_THREAD = 1UL << 3,
225 /* LeakSanitizer. */
226 SANITIZE_LEAK = 1UL << 4,
227 /* UndefinedBehaviorSanitizer. */
228 SANITIZE_SHIFT_BASE = 1UL << 5,
229 SANITIZE_SHIFT_EXPONENT = 1UL << 6,
230 SANITIZE_DIVIDE = 1UL << 7,
231 SANITIZE_UNREACHABLE = 1UL << 8,
232 SANITIZE_VLA = 1UL << 9,
233 SANITIZE_NULL = 1UL << 10,
234 SANITIZE_RETURN = 1UL << 11,
235 SANITIZE_SI_OVERFLOW = 1UL << 12,
236 SANITIZE_BOOL = 1UL << 13,
237 SANITIZE_ENUM = 1UL << 14,
238 SANITIZE_FLOAT_DIVIDE = 1UL << 15,
239 SANITIZE_FLOAT_CAST = 1UL << 16,
240 SANITIZE_BOUNDS = 1UL << 17,
241 SANITIZE_ALIGNMENT = 1UL << 18,
242 SANITIZE_NONNULL_ATTRIBUTE = 1UL << 19,
243 SANITIZE_RETURNS_NONNULL_ATTRIBUTE = 1UL << 20,
244 SANITIZE_OBJECT_SIZE = 1UL << 21,
245 SANITIZE_VPTR = 1UL << 22,
246 SANITIZE_BOUNDS_STRICT = 1UL << 23,
247 SANITIZE_POINTER_OVERFLOW = 1UL << 24,
248 SANITIZE_BUILTIN = 1UL << 25,
249 SANITIZE_POINTER_COMPARE = 1UL << 26,
250 SANITIZE_POINTER_SUBTRACT = 1UL << 27,
251 SANITIZE_SHIFT = SANITIZE_SHIFT_BASE | SANITIZE_SHIFT_EXPONENT,
252 SANITIZE_UNDEFINED = SANITIZE_SHIFT | SANITIZE_DIVIDE | SANITIZE_UNREACHABLE
253 | SANITIZE_VLA | SANITIZE_NULL | SANITIZE_RETURN
254 | SANITIZE_SI_OVERFLOW | SANITIZE_BOOL | SANITIZE_ENUM
255 | SANITIZE_BOUNDS | SANITIZE_ALIGNMENT
256 | SANITIZE_NONNULL_ATTRIBUTE
257 | SANITIZE_RETURNS_NONNULL_ATTRIBUTE
258 | SANITIZE_OBJECT_SIZE | SANITIZE_VPTR
259 | SANITIZE_POINTER_OVERFLOW | SANITIZE_BUILTIN,
260 SANITIZE_UNDEFINED_NONDEFAULT = SANITIZE_FLOAT_DIVIDE | SANITIZE_FLOAT_CAST
261 | SANITIZE_BOUNDS_STRICT
264 /* Different trace modes. */
265 enum sanitize_coverage_code {
266 /* Trace PC. */
267 SANITIZE_COV_TRACE_PC = 1 << 0,
268 /* Trace Comparison. */
269 SANITIZE_COV_TRACE_CMP = 1 << 1
272 /* flag_vtable_verify initialization levels. */
273 enum vtv_priority {
274 VTV_NO_PRIORITY = 0, /* i.E. Do NOT do vtable verification. */
275 VTV_STANDARD_PRIORITY = 1,
276 VTV_PREINIT_PRIORITY = 2
279 /* flag_lto_partition initialization values. */
280 enum lto_partition_model {
281 LTO_PARTITION_NONE = 0,
282 LTO_PARTITION_ONE = 1,
283 LTO_PARTITION_BALANCED = 2,
284 LTO_PARTITION_1TO1 = 3,
285 LTO_PARTITION_MAX = 4
288 /* flag_lto_linker_output initialization values. */
289 enum lto_linker_output {
290 LTO_LINKER_OUTPUT_UNKNOWN,
291 LTO_LINKER_OUTPUT_REL,
292 LTO_LINKER_OUTPUT_DYN,
293 LTO_LINKER_OUTPUT_PIE,
294 LTO_LINKER_OUTPUT_EXEC
297 /* gfortran -finit-real= values. */
299 enum gfc_init_local_real
301 GFC_INIT_REAL_OFF = 0,
302 GFC_INIT_REAL_ZERO,
303 GFC_INIT_REAL_NAN,
304 GFC_INIT_REAL_SNAN,
305 GFC_INIT_REAL_INF,
306 GFC_INIT_REAL_NEG_INF
309 /* gfortran -fcoarray= values. */
311 enum gfc_fcoarray
313 GFC_FCOARRAY_NONE = 0,
314 GFC_FCOARRAY_SINGLE,
315 GFC_FCOARRAY_LIB
319 /* gfortran -fconvert= values; used for unformatted I/O.
320 Keep in sync with GFC_CONVERT_* in gcc/fortran/libgfortran.h. */
321 enum gfc_convert
323 GFC_FLAG_CONVERT_NATIVE = 0,
324 GFC_FLAG_CONVERT_SWAP,
325 GFC_FLAG_CONVERT_BIG,
326 GFC_FLAG_CONVERT_LITTLE
330 /* Control-Flow Protection values. */
331 enum cf_protection_level
333 CF_NONE = 0,
334 CF_BRANCH = 1 << 0,
335 CF_RETURN = 1 << 1,
336 CF_FULL = CF_BRANCH | CF_RETURN,
337 CF_SET = 1 << 2
339 #endif /* ! GCC_FLAG_TYPES_H */