| ; analyzer.opt -- Options for the analyzer. | |
| ; Copyright (C) 2019-2026 Free Software Foundation, Inc. | |
| ; | |
| ; This file is part of GCC. | |
| ; | |
| ; GCC is free software; you can redistribute it and/or modify it under | |
| ; the terms of the GNU General Public License as published by the Free | |
| ; Software Foundation; either version 3, or (at your option) any later | |
| ; version. | |
| ; | |
| ; GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
| ; WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
| ; for more details. | |
| ; | |
| ; You should have received a copy of the GNU General Public License | |
| ; along with GCC; see the file COPYING3. If not see | |
| ; <http://www.gnu.org/licenses/>. | |
| ; See the GCC internals manual for a description of this file's format. | |
| ; Please try to keep this file in ASCII collating order. | |
| -param=analyzer-max-enodes-per-program-point= | |
| Common Joined UInteger Var(param_analyzer_max_enodes_per_program_point) Init(8) Param | |
| The maximum number of exploded nodes per program point within the analyzer, before terminating analysis of that point. | |
| -param=analyzer-max-constraints= | |
| Common Joined UInteger Var(param_analyzer_max_constraints) Init(20) Param | |
| The maximum number of constraints per state. | |
| -param=analyzer-max-infeasible-edges= | |
| Common Joined UInteger Var(param_analyzer_max_infeasible_edges) Init(10) Param | |
| The maximum number of infeasible edges to reject before declaring a diagnostic as infeasible. | |
| -param=analyzer-max-macro-alias-depth= | |
| Common Joined UInteger Var(param_analyzer_max_macro_alias_depth) Init(8) Param | |
| Maximum number of macro aliases to follow when resolving named constants in the analyzer; zero disables alias following. | |
| -param=analyzer-max-recursion-depth= | |
| Common Joined UInteger Var(param_analyzer_max_recursion_depth) Init(2) Param | |
| The maximum number of times a callsite can appear in a call stack within the analyzer, before terminating analysis of a call that would recurse deeper. | |
| -param=analyzer-max-svalue-depth= | |
| Common Joined UInteger Var(param_analyzer_max_svalue_depth) Init(18) Param | |
| The maximum depth of a symbolic value, before approximating the value as unknown. | |
| -param=analyzer-min-snodes-for-call-summary= | |
| Common Joined UInteger Var(param_analyzer_min_snodes_for_call_summary) Init(10) Param | |
| The minimum number of supernodes within a function for the analyzer to consider summarizing its effects at call sites. | |
| -param=analyzer-max-enodes-for-full-dump= | |
| Common Joined UInteger Var(param_analyzer_max_enodes_for_full_dump) Init(200) Param | |
| The maximum depth of exploded nodes that should appear in a dot dump before switching to a less verbose format. | |
| -param=analyzer-supernode-explosion-factor= | |
| Common Joined UInteger Var(param_analyzer_supernode_explosion_factor) Init(5) Param | |
| The maximum number of exploded nodes within the analyzer per supernode, before terminating analysis. | |
| -param=analyzer-text-art-string-ellipsis-threshold= | |
| Common Joined UInteger Var(param_analyzer_text_art_string_ellipsis_threshold) Init(15) Param | |
| The number of bytes at which to ellipsize string literals in analyzer text art diagrams. | |
| -param=analyzer-text-art-string-ellipsis-head-len= | |
| Common Joined UInteger Var(param_analyzer_text_art_string_ellipsis_head_len) Init(6) Param | |
| The number of literal bytes to show at the head of a string literal in text art when ellipsizing it. | |
| -param=analyzer-text-art-string-ellipsis-tail-len= | |
| Common Joined UInteger Var(param_analyzer_text_art_string_ellipsis_tail_len) Init(6) Param | |
| The number of literal bytes to show at the tail of a string literal in text art when ellipsizing it. | |
| -param=analyzer-text-art-ideal-canvas-width= | |
| Common Joined UInteger Var(param_analyzer_text_art_ideal_canvas_width) Init(72) Param | |
| The ideal width in characters of text art diagrams generated by the analyzer. | |
| Wanalyzer-allocation-size | |
| Common Var(warn_analyzer_allocation_size) Init(1) Warning | |
| Warn about code paths in which a pointer to a buffer is assigned to an incompatible type. | |
| Wanalyzer-deref-before-check | |
| Common Var(warn_analyzer_deref_before_check) Init(1) Warning | |
| Warn about code paths in which a pointer is checked for NULL after it has already been dereferenced. | |
| Wanalyzer-div-by-zero | |
| Common Var(warn_analyzer_div_by_zero) Init(1) Warning | |
| Warn about code paths which attempt integer division by zero. | |
| Wanalyzer-double-fclose | |
| Common Var(warn_analyzer_double_fclose) Init(1) Warning | |
| Warn about code paths in which a stdio FILE can be closed more than once. | |
| Wanalyzer-double-free | |
| Common Var(warn_analyzer_double_free) Init(1) Warning | |
| Warn about code paths in which a pointer can be freed more than once. | |
| Wanalyzer-exposure-through-output-file | |
| Common Var(warn_analyzer_exposure_through_output_file) Init(1) Warning | |
| Warn about code paths in which sensitive data is written to a file. | |
| Wanalyzer-exposure-through-uninit-copy | |
| Common Var(warn_analyzer_exposure_through_uninit_copy) Init(1) Warning | |
| Warn about code paths in which sensitive data is copied across a security boundary. | |
| Wanalyzer-fd-access-mode-mismatch | |
| Common Var(warn_analyzer_fd_mode_mismatch) Init(1) Warning | |
| Warn about code paths in which read on a write-only file descriptor is attempted, or vice versa. | |
| Wanalyzer-fd-double-close | |
| Common Var(warn_analyzer_fd_double_close) Init(1) Warning | |
| Warn about code paths in which a file descriptor can be closed more than once. | |
| Wanalyzer-fd-leak | |
| Common Var(warn_analyzer_fd_leak) Init(1) Warning | |
| Warn about code paths in which a file descriptor is not closed. | |
| Wanalyzer-fd-phase-mismatch | |
| Common Var(warn_analyzer_fd_phase_mismatch) Init(1) Warning | |
| Warn about code paths in which an operation is attempted in the wrong phase of a file descriptor's lifetime. | |
| Wanalyzer-fd-type-mismatch | |
| Common Var(warn_analyzer_fd_type_mismatch) Init(1) Warning | |
| Warn about code paths in which an operation is attempted on the wrong type of file descriptor. | |
| Wanalyzer-fd-use-after-close | |
| Common Var(warn_analyzer_fd_use_after_close) Init(1) Warning | |
| Warn about code paths in which a read or write is performed on a closed file descriptor. | |
| Wanalyzer-fd-use-without-check | |
| Common Var(warn_analyzer_fd_use_without_check) Init(1) Warning | |
| Warn about code paths in which a file descriptor is used without being checked for validity. | |
| Wanalyzer-file-leak | |
| Common Var(warn_analyzer_file_leak) Init(1) Warning | |
| Warn about code paths in which a stdio FILE is not closed. | |
| Wanalyzer-free-of-non-heap | |
| Common Var(warn_analyzer_free_of_non_heap) Init(1) Warning | |
| Warn about code paths in which a non-heap pointer is freed. | |
| Wanalyzer-imprecise-fp-arithmetic | |
| Common Var(warn_analyzer_imprecise_fp_arithmetic) Init(1) Warning | |
| Warn about code paths in which floating-point arithmetic is used in locations where precise computation is needed. | |
| Wanalyzer-infinite-loop | |
| Common Var(warn_analyzer_infinite_loop) Init(1) Warning | |
| Warn about code paths which appear to lead to an infinite loop. | |
| Wanalyzer-infinite-recursion | |
| Common Var(warn_analyzer_infinite_recursion) Init(1) Warning | |
| Warn about code paths which appear to lead to infinite recursion. | |
| Wanalyzer-jump-through-null | |
| Common Var(warn_analyzer_jump_through_null) Init(1) Warning | |
| Warn about code paths in which a NULL function pointer is called. | |
| Wanalyzer-malloc-leak | |
| Common Var(warn_analyzer_malloc_leak) Init(1) Warning | |
| Warn about code paths in which a heap-allocated pointer leaks. | |
| Wanalyzer-mismatching-deallocation | |
| Common Var(warn_analyzer_mismatching_deallocation) Init(1) Warning | |
| Warn about code paths in which the wrong deallocation function is called. | |
| Wanalyzer-mkostemp-redundant-flags | |
| Common Var(warn_analyzer_mkostemp_redundant_flags) Init(1) Warning | |
| Warn about code paths in which mkostemp or mkostemps are called with flags that are already included internally. | |
| Wanalyzer-mktemp-missing-placeholder | |
| Common Var(warn_analyzer_mktemp_missing_placeholder) Init(1) Warning | |
| Warn about code paths in which a function in the mktemp family is called with a template not containing the placeholder \"XXXXXX\". | |
| Wanalyzer-mktemp-of-string-literal | |
| Common Var(warn_analyzer_mktemp_of_string_literal) Init(1) Warning | |
| Warn about code paths in which a string literal is passed to a function in the mktemp family. | |
| Wanalyzer-out-of-bounds | |
| Common Var(warn_analyzer_out_of_bounds) Init(1) Warning | |
| Warn about code paths in which a write or read to a buffer is out-of-bounds. | |
| Wanalyzer-overlapping-buffers | |
| Common Var(warn_analyzer_overlapping_buffers) Init(1) Warning | |
| Warn about code paths in which undefined behavior would occur due to overlapping buffers. | |
| Wanalyzer-possible-null-argument | |
| Common Var(warn_analyzer_possible_null_argument) Init(1) Warning | |
| Warn about code paths in which a possibly-NULL value is passed to a must-not-be-NULL function argument. | |
| Wanalyzer-possible-null-dereference | |
| Common Var(warn_analyzer_possible_null_dereference) Init(1) Warning | |
| Warn about code paths in which a possibly-NULL pointer is dereferenced. | |
| Wanalyzer-unsafe-call-within-signal-handler | |
| Common Var(warn_analyzer_unsafe_call_within_signal_handler) Init(1) Warning | |
| Warn about code paths in which an async-signal-unsafe function is called from a signal handler. | |
| Wanalyzer-null-argument | |
| Common Var(warn_analyzer_null_argument) Init(1) Warning | |
| Warn about code paths in which NULL is passed to a must-not-be-NULL function argument. | |
| Wanalyzer-null-dereference | |
| Common Var(warn_analyzer_null_dereference) Init(1) Warning | |
| Warn about code paths in which a NULL pointer is dereferenced. | |
| Wanalyzer-putenv-of-auto-var | |
| Common Var(warn_analyzer_putenv_of_auto_var) Init(1) Warning | |
| Warn about code paths in which an on-stack buffer is passed to putenv. | |
| Wanalyzer-shift-count-negative | |
| Common Var(warn_analyzer_shift_count_negative) Init(1) Warning | |
| Warn about code paths in which a shift with negative count is attempted. | |
| Wanalyzer-shift-count-overflow | |
| Common Var(warn_analyzer_shift_count_overflow) Init(1) Warning | |
| Warn about code paths in which a shift with count >= width of type is attempted. | |
| Wanalyzer-stale-setjmp-buffer | |
| Common Var(warn_analyzer_stale_setjmp_buffer) Init(1) Warning | |
| Warn about code paths in which a longjmp rewinds to a jmp_buf saved in a stack frame that has returned. | |
| Wanalyzer-tainted-allocation-size | |
| Common Var(warn_analyzer_tainted_allocation_size) Init(1) Warning | |
| Warn about code paths in which an unsanitized value is used as an allocation size. | |
| Wanalyzer-tainted-array-index | |
| Common Var(warn_analyzer_tainted_array_index) Init(1) Warning | |
| Warn about code paths in which an unsanitized value is used as an array index. | |
| Wanalyzer-tainted-assertion | |
| Common Var(warn_analyzer_tainted_assertion) Init(1) Warning | |
| Warn about code paths in which an 'assert()' is made involving an unsanitized value. | |
| Wanalyzer-tainted-divisor | |
| Common Var(warn_analyzer_tainted_divisor) Init(1) Warning | |
| Warn about code paths in which an unsanitized value is used as a divisor. | |
| Wanalyzer-tainted-offset | |
| Common Var(warn_analyzer_tainted_offset) Init(1) Warning | |
| Warn about code paths in which an unsanitized value is used as a pointer offset. | |
| Wanalyzer-tainted-size | |
| Common Var(warn_analyzer_tainted_size) Init(1) Warning | |
| Warn about code paths in which an unsanitized value is used as a size. | |
| Wanalyzer-throw-of-unexpected-type | |
| Common Var(warn_analyzer_throw_of_unexpected_type) Init(1) Warning | |
| Warn about code paths in which an exception of unexpected type is thrown. | |
| Wanalyzer-undefined-behavior-ptrdiff | |
| Common Var(warn_analyzer_undefined_behavior_ptrdiff) Init(1) Warning | |
| Warn about code paths in which pointer subtraction involves undefined behavior. | |
| Wanalyzer-undefined-behavior-strtok | |
| Common Var(warn_analyzer_undefined_behavior_strtok) Init(1) Warning | |
| Warn about code paths in which a call is made to strtok with undefined behavior. | |
| Wanalyzer-use-after-free | |
| Common Var(warn_analyzer_use_after_free) Init(1) Warning | |
| Warn about code paths in which a freed value is used. | |
| Wanalyzer-use-of-pointer-in-stale-stack-frame | |
| Common Var(warn_analyzer_use_of_pointer_in_stale_stack_frame) Init(1) Warning | |
| Warn about code paths in which a pointer to a stale stack frame is used. | |
| Wanalyzer-va-arg-type-mismatch | |
| Common Var(warn_analyzer_va_arg_type_mismatch) Init(1) Warning | |
| Warn about code paths in which va_arg uses the wrong type. | |
| Wanalyzer-va-list-exhausted | |
| Common Var(warn_analyzer_va_list_exhausted) Init(1) Warning | |
| Warn about code paths in which va_arg is used too many times on a va_list. | |
| Wanalyzer-va-list-leak | |
| Common Var(warn_analyzer_va_list_leak) Init(1) Warning | |
| Warn about code paths in which va_start or va_copy is used without a corresponding va_end. | |
| Wanalyzer-va-list-use-after-va-end | |
| Common Var(warn_analyzer_va_list_use_after_va_end) Init(1) Warning | |
| Warn about code paths in which a va_list is used after va_end. | |
| Wanalyzer-write-to-const | |
| Common Var(warn_analyzer_write_to_const) Init(1) Warning | |
| Warn about code paths which attempt to write to a const object. | |
| Wanalyzer-write-to-string-literal | |
| Common Var(warn_analyzer_write_to_string_literal) Init(1) Warning | |
| Warn about code paths which attempt to write to a string literal. | |
| Wanalyzer-use-of-uninitialized-value | |
| Common Var(warn_analyzer_use_of_uninitialized_value) Init(1) Warning | |
| Warn about code paths in which an uninitialized value is used. | |
| Wanalyzer-symbol-too-complex | |
| Common Var(warn_analyzer_symbol_too_complex) Init(0) Warning | |
| Warn if expressions are too complicated for the analyzer to fully track. | |
| Wanalyzer-too-complex | |
| Common Var(warn_analyzer_too_complex) Init(0) Warning | |
| Warn if the code is too complicated for the analyzer to fully explore. | |
| fanalyzer-assume-nothrow | |
| Common Var(flag_analyzer_assume_nothrow) Init(0) | |
| Assume that no function calls can throw exceptions. | |
| fanalyzer-checker= | |
| Common Joined RejectNegative Var(flag_analyzer_checker) | |
| Restrict the analyzer to run just the named checker. | |
| fanalyzer-debug-text-art | |
| Common Var(flag_analyzer_debug_text_art) Init(0) | |
| Add extra annotations to diagrams. | |
| fanalyzer-fine-grained | |
| Common Ignore | |
| Does nothing. Preserved for backward compatibility. | |
| fanalyzer-feasibility | |
| Common Var(flag_analyzer_feasibility) Init(1) | |
| Verify that paths are feasible when emitting diagnostics. | |
| fanalyzer-show-duplicate-count | |
| Common Var(flag_analyzer_show_duplicate_count) Init(0) | |
| Issue a note when diagnostics are deduplicated. | |
| fanalyzer-simplify-supergraph | |
| Common Var(flag_analyzer_simplify_supergraph) Init(1) | |
| Simplify the supergraph before analyzing it. | |
| fanalyzer-state-purge | |
| Common Var(flag_analyzer_state_purge) Init(1) | |
| Purge unneeded state during analysis. | |
| fanalyzer-state-merge | |
| Common Var(flag_analyzer_state_merge) Init(1) | |
| Merge similar-enough states during analysis. | |
| fanalyzer-suppress-followups | |
| Common Var(flag_analyzer_suppress_followups) Init(1) | |
| Stop exploring an execution path after certain diagnostics. | |
| fanalyzer-transitivity | |
| Common Var(flag_analyzer_transitivity) Init(0) | |
| Enable transitivity of constraints during analysis. | |
| fanalyzer-show-events-in-system-headers | |
| Common Var(flag_analyzer_show_events_in_system_headers) Init(0) | |
| Show events within system headers in analyzer execution paths. | |
| fanalyzer-call-summaries | |
| Common Var(flag_analyzer_call_summaries) Init(0) | |
| Approximate the effect of function calls to simplify analysis. | |
| fanalyzer-undo-inlining | |
| Common Var(flag_analyzer_undo_inlining) Init(1) | |
| Try to reconstruct function calls and returns after inlining. | |
| fanalyzer-verbose-edges | |
| Common Var(flag_analyzer_verbose_edges) Init(0) | |
| Emit more verbose descriptions of control flow in diagnostics. | |
| fanalyzer-verbose-state-changes | |
| Common Var(flag_analyzer_verbose_state_changes) Init(0) | |
| Emit more verbose descriptions of state changes in diagnostics. | |
| fanalyzer-verbosity= | |
| Common RejectNegative Joined UInteger Var(analyzer_verbosity) Init(2) | |
| Control which events are displayed in diagnostic paths. | |
| fdump-analyzer | |
| Common RejectNegative Var(flag_dump_analyzer) | |
| Dump various analyzer internals to SRCFILE.analyzer.txt. | |
| fdump-analyzer-stderr | |
| Common RejectNegative Var(flag_dump_analyzer_stderr) | |
| Dump various analyzer internals to stderr. | |
| fdump-analyzer-callgraph | |
| Common Ignore | |
| Does nothing. Preserved for backward compatibility. | |
| fdump-analyzer-exploded-graph | |
| Common RejectNegative Var(flag_dump_analyzer_exploded_graph) | |
| Dump the analyzer exploded graph to a SRCFILE.eg.dot file. | |
| fdump-analyzer-exploded-nodes | |
| Common RejectNegative Var(flag_dump_analyzer_exploded_nodes) | |
| Emit diagnostics showing the location of nodes in the exploded graph. | |
| fdump-analyzer-exploded-nodes-2 | |
| Common RejectNegative Var(flag_dump_analyzer_exploded_nodes_2) | |
| Dump a textual representation of the exploded graph to SRCFILE.eg.txt. | |
| fdump-analyzer-exploded-nodes-3 | |
| Common RejectNegative Var(flag_dump_analyzer_exploded_nodes_3) | |
| Dump a textual representation of the exploded graph to SRCFILE.eg-ID.txt. | |
| fdump-analyzer-exploded-paths | |
| Common RejectNegative Var(flag_dump_analyzer_exploded_paths) | |
| Dump a textual representation of each diagnostic's exploded path to SRCFILE.IDX.KIND.epath.txt. | |
| fdump-analyzer-feasibility | |
| Common RejectNegative Var(flag_dump_analyzer_feasibility) | |
| Dump various analyzer internals to SRCFILE.*.fg.dot and SRCFILE.*.tg.dot. | |
| fdump-analyzer-infinite-loop | |
| Common RejectNegative Var(flag_dump_analyzer_infinite_loop) | |
| Dump various analyzer internals to SRCFILE.*.infinite-loop.dot. | |
| fdump-analyzer-json | |
| Common RejectNegative Var(flag_dump_analyzer_json) | |
| Dump analyzer-specific data to a SRCFILE.analyzer.json.gz file. | |
| fdump-analyzer-state-purge | |
| Common RejectNegative Var(flag_dump_analyzer_state_purge) | |
| Dump state-purging information to a SRCFILE.state-purge.dot file. | |
| fdump-analyzer-supergraph | |
| Common RejectNegative Var(flag_dump_analyzer_supergraph) | |
| Dump the analyzer supergraph to a SRCFILE.supergraph.dot file. | |
| fdump-analyzer-untracked | |
| Common RejectNegative Var(flag_dump_analyzer_untracked) | |
| Emit custom warnings with internal details intended for analyzer developers. | |
| ; This comment is to ensure we retain the blank line above. |