; Options for the language- and target-independent parts of the compiler.
-; Copyright (C) 2003-2021 Free Software Foundation, Inc.
+; Copyright (C) 2003-2022 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
Variable
int flag_complex_method = 1
+Variable
+int flag_default_complex_method = 1
+
; Language specific warning pass for unused results.
Variable
bool flag_warn_unused_result = false
Variable
int flag_shlib
-; These two are really VEC(char_p,heap) *.
+; These three are really VEC(char_p,heap) *.
Variable
void *flag_instrument_functions_exclude_functions
Variable
void *flag_instrument_functions_exclude_files
+Variable
+void *flag_ignored_attributes
+
; Generic structs (e.g. templates not explicitly specialized)
; may not have a compilation unit associated with them, and so
; may need to be treated differently from ordinary structs.
Common Optimization
Optimize for debugging experience rather than speed or size.
+Oz
+Common Optimization
+Optimize for space aggressively rather than speed.
+
Q
Driver
Common Joined RejectNegative UInteger Var(warn_array_bounds) Warning IntegerRange(0, 2)
Warn if an array is accessed out of bounds.
+Wuse-after-free
+Common Var(warn_use_after_free) Warning
+Warn for uses of pointers to deallocated strorage.
+
+Wuse-after-free=
+Common Joined RejectNegative UInteger Var(warn_use_after_free) Warning IntegerRange(0, 3)
+Warn for uses of pointers to deallocated strorage.
+
Wattributes
Common Var(warn_attributes) Init(1) Warning
Warn about inappropriate attribute usage.
+Wattributes=
+Common Joined
+Do not warn about specified attributes.
+
Wattribute-alias
Common Alias(Wattribute_alias=, 1, 0) Warning
Warn about type safety and similar errors and mismatches in declarations with alias attributes.
Common Var(warn_implicit_fallthrough) RejectNegative Joined UInteger Warning IntegerRange(0, 5)
Warn when a switch case falls through.
+Winfinite-recursion
+Var(warn_infinite_recursion) Warning
+Warn for infinitely recursive calls.
+
Winline
Common Var(warn_inline) Warning Optimization
Warn when an inlined function cannot be inlined.
; Adds missing 'on' in mangling of operator names in some cases.
; Default in G++ 11.
;
+; 17: Fixes layout of classes that inherit from aggregate classes with default
+; member initializers in C++14 and up.
+; Default in G++ 12.
+;
; Additional positive integers will be assigned as new versions of
; the ABI become the default version of the ABI.
fabi-version=
Common Joined RejectNegative Enum(diagnostics_output_format)
-fdiagnostics-format=[text|json] Select output format.
+fdiagnostics-escape-format=
+Common Joined RejectNegative Enum(diagnostics_escape_format)
+-fdiagnostics-escape-format=[unicode|bytes] Select how to escape non-printable-ASCII bytes in the source for diagnostics that suggest it.
+
; Required for these enum values.
SourceInclude
diagnostic.h
EnumValue
Enum(diagnostics_column_unit) String(byte) Value(DIAGNOSTICS_COLUMN_UNIT_BYTE)
+Enum
+Name(diagnostics_escape_format) Type(int)
+
+EnumValue
+Enum(diagnostics_escape_format) String(unicode) Value(DIAGNOSTICS_ESCAPE_FORMAT_UNICODE)
+
+EnumValue
+Enum(diagnostics_escape_format) String(bytes) Value(DIAGNOSTICS_ESCAPE_FORMAT_BYTES)
+
Enum
Name(diagnostics_output_format) Type(int)
Do not suppress C++ class debug information.
fexceptions
-Common Var(flag_exceptions) Optimization
+Common Var(flag_exceptions) Optimization EnabledBy(fnon-call-exceptions)
Enable exception handling.
fexpensive-optimizations
fexcess-precision=
Common Joined RejectNegative Enum(excess_precision) Var(flag_excess_precision) Init(EXCESS_PRECISION_DEFAULT) Optimization SetByCombined
--fexcess-precision=[fast|standard] Specify handling of excess floating-point precision.
+-fexcess-precision=[fast|standard|16] Specify handling of excess floating-point precision.
Enum
Name(excess_precision) Type(enum excess_precision) UnknownError(unknown excess precision style %qs)
EnumValue
Enum(excess_precision) String(standard) Value(EXCESS_PRECISION_STANDARD)
+EnumValue
+Enum(excess_precision) String(16) Value(EXCESS_PRECISION_FLOAT16)
+
; Whether we permit the extended set of values for FLT_EVAL_METHOD
; introduced in ISO/IEC TS 18661-3, or limit ourselves to those in C99/C11.
fpermitted-flt-eval-methods=
Common Var(flag_guess_branch_prob) Optimization
Enable guessing of branch probabilities.
+fharden-compares
+Common Var(flag_harden_compares) Optimization
+Harden conditionals not used in branches, checking reversed conditions.
+
+fharden-conditional-branches
+Common Var(flag_harden_conditional_branches) Optimization
+Harden conditional branches by checking reversed conditions.
+
; Nonzero means ignore `#ident' directives. 0 means handle them.
; Generate position-independent code for executables if possible
; On SVR4 targets, it also controls whether or not to emit a
Common Joined RejectNegative Enum(ira_algorithm) Var(flag_ira_algorithm) Init(IRA_ALGORITHM_CB) Optimization
-fira-algorithm=[CB|priority] Set the used IRA algorithm.
+fipa-strict-aliasing
+Common Var(flag_ipa_strict_aliasing) Init(1) Optimization
+Assume strict aliasing rules apply across (uninlined) function boundaries.
+
Enum
Name(ira_algorithm) Type(enum ira_algorithm) UnknownError(unknown IRA algorithm %qs)
Enum(ira_algorithm) String(priority) Value(IRA_ALGORITHM_PRIORITY)
fira-region=
-Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_AUTODETECT) Optimization
+Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_ONE) Optimization
-fira-region=[one|all|mixed] Set regions for IRA.
Enum
Common Var(flag_move_loop_invariants) Optimization
Move loop invariant computations out of loops.
+fmove-loop-stores
+Common Var(flag_move_loop_stores) Optimization
+Move stores out of loops.
+
fdce
Common Var(flag_dce) Init(1) Optimization
Use the RTL dead code elimination pass.
-foffload-options=<targets>=<options> Specify options for the offloading targets.
foffload-abi=
-Common Joined RejectNegative Enum(offload_abi) Var(flag_offload_abi) Init(OFFLOAD_ABI_UNSET)
+Common Joined RejectNegative Enum(offload_abi)
-foffload-abi=[lp64|ilp32] Set the ABI to use in an offload compiler.
Enum
Common Joined RejectNegative Var(profile_prefix_path)
Remove prefix from absolute path before mangling name for -fprofile-generate= and -fprofile-use=.
+fprofile-prefix-map=
+Common Joined RejectNegative Var(common_deferred_options) Defer
+-fprofile-prefix-map=<old>=<new> Map one directory name to another in GCOV coverage result.
+
fprofile-generate
Common
Enable common options for generating profile info for profile feedback directed optimizations.
Relief of register pressure through live range shrinkage.
frename-registers
-Common Var(flag_rename_registers) Init(2) Optimization
+Common Var(flag_rename_registers) Optimization EnabledBy(funroll-loops)
Perform a register renaming optimization pass.
fschedule-fusion
Reschedule pipelined regions without pipelining.
fsemantic-interposition
-Common Var(flag_semantic_interposition) Init(1)
+Common Var(flag_semantic_interposition) Init(1) Optimization
Allow interposing function (or variables) by ones with different semantics (or initializer) respectively by dynamic linker.
; sched_stalled_insns means that insns can be moved prematurely from the queue
Does nothing. Preserved for backward compatibility.
ftree-cselim
-Common Var(flag_tree_cselim) Init(2) Optimization
+Common Var(flag_tree_cselim) Optimization
Transform condition stores into unconditional ones.
ftree-switch-conversion
Compile whole compilation unit at a time.
funroll-loops
-Common Var(flag_unroll_loops) Optimization
+Common Var(flag_unroll_loops) Optimization EnabledBy(funroll-all-loops)
Perform loop unrolling when iteration count is known.
funroll-all-loops
Common Driver Negative(fuse-ld=lld)
Use the lld LLVM linker instead of the default linker.
+fuse-ld=mold
+Common Driver Negative(fuse-ld=mold)
+Use the Modern linker (MOLD) linker instead of the default linker.
+
fuse-linker-plugin
Common Undocumented Var(flag_use_linker_plugin)
; Positive if we should track variables, negative if we should run
; the var-tracking pass only to discard debug annotations, zero if
-; we're not to run it. When flag_var_tracking == 2 (AUTODETECT_VALUE) it
-; will be set according to optimize, debug_info_level and debug_hooks
-; in process_options ().
+; we're not to run it.
fvar-tracking
-Common Var(flag_var_tracking) Init(2) PerFunction
+Common Var(flag_var_tracking) PerFunction EnabledBy(fvar-tracking-uninit)
Perform variable tracking.
; Positive if we should track variables at assignments, negative if
; we should run the var-tracking pass only to discard debug
-; annotations. When flag_var_tracking_assignments ==
-; AUTODETECT_VALUE it will be set according to flag_var_tracking.
+; annotations.
fvar-tracking-assignments
-Common Var(flag_var_tracking_assignments) Init(2) PerFunction
+Common Var(flag_var_tracking_assignments) PerFunction
Perform variable tracking by annotating assignments.
; Nonzero if we should toggle flag_var_tracking_assignments after
; Positive if we should track uninitialized variables, negative if
; we should run the var-tracking pass only to discard debug
-; annotations. When flag_var_tracking_uninit == AUTODETECT_VALUE it
-; will be set according to flag_var_tracking.
+; annotations.
fvar-tracking-uninit
Common Var(flag_var_tracking_uninit) PerFunction
Perform variable tracking and also tag variables that are uninitialized.
; Alias to enable both -ftree-loop-vectorize and -ftree-slp-vectorize.
ftree-vectorize
-Common Optimization
+Common Var(flag_tree_vectorize) Optimization
Enable vectorization on trees.
ftree-vectorizer-verbose=
Common Var(flag_tree_scev_cprop) Init(1) Optimization
Enable copy propagation of scalar-evolution information.
+ftrivial-auto-var-init=
+Common Joined RejectNegative Enum(auto_init_type) Var(flag_auto_var_init) Init(AUTO_INIT_UNINITIALIZED) Optimization
+-ftrivial-auto-var-init=[uninitialized|pattern|zero] Add initializations to automatic variables.
+
+Enum
+Name(auto_init_type) Type(enum auto_init_type) UnknownError(unrecognized automatic variable initialization type %qs)
+
+EnumValue
+Enum(auto_init_type) String(uninitialized) Value(AUTO_INIT_UNINITIALIZED)
+
+EnumValue
+Enum(auto_init_type) String(pattern) Value(AUTO_INIT_PATTERN)
+
+EnumValue
+Enum(auto_init_type) String(zero) Value(AUTO_INIT_ZERO)
+
; -fverbose-asm causes extra commentary information to be produced in
; the generated assembly code (to make it more readable). This option
; is generally only of use to those who actually need to read the
Use expression value profiles in optimizations.
fweb
-Common Var(flag_web) Init(2) Optimization
+Common Var(flag_web) Optimization EnabledBy(funroll-loops)
Construct webs and split unrelated uses of single variable.
ftree-builtin-call-dce
Generate debug information in default format.
gas-loc-support
-Common Driver Var(dwarf2out_as_loc_support) Init(2)
+Common Driver Var(dwarf2out_as_loc_support)
Assume assembler support for (DWARF2+) .loc directives.
gas-locview-support
-Common Driver Var(dwarf2out_as_locview_support) Init(2)
+Common Driver Var(dwarf2out_as_locview_support)
Assume assembler support for view in (DWARF2+) .loc directives.
gcoff
Generate debug information in default extended format.
ginline-points
-Common Driver Var(debug_inline_points) Init(2)
+Common Driver Var(debug_inline_points)
Generate extended entry point information for inlined functions.
ginternal-reset-location-views
Generate debug information in extended STABS format.
gstatement-frontiers
-Common Driver Var(debug_nonbind_markers_p) Init(2)
+Common Driver Var(debug_nonbind_markers_p) PerFunction
Emit progressive recommended breakpoint locations.
gstrict-dwarf
Toggle debug information generation.
gvariable-location-views
-Common Driver Var(debug_variable_location_views, 1) Init(2)
+Common Driver Var(debug_variable_location_views, 1)
Augment variable location lists with progressive views.
gvariable-location-views=incompat5
Driver
; Documented for Fortran, but always accepted by driver.
+static-libphobos
+Driver
+; Documented for D, but always accepted by driver.
+
static-libstdc++
Driver