GCC(1) GNU GCC(1) (NAME) gcc - C C++ (SYNOPSIS) gcc [-c|-S|-E] [-std=standard] [-g] [-pg] [-Olevel] [-Wwarn...] [-Wpedantic] [-Idir...] [-Ldir...] [-Dmacro[=defn]...] [-Umacro] [-foption...] [-mmachine-option...] [-o outfile] [@file] infile... . g++ gcc . (DESCRIPTION) GCC (linking) . << >> . -c . (object files) . . . . GCC C ( C++) . . GCC gcc machine-gcc (cross-compiling) machine-gcc-version GCC. C++ GCC g++ . gcc . : -dv -d -v . . . -L . -l . -f -W -fmove-loop-invariants -Wformat . -ffoo -fno-foo . . (=) . . (hexadecimal) . 0x . "kB" "KiB" "MB" "MiB" "GB" "GiB" . byte-size . NIST IEC ..SH " (OPTIONS)" (Option Summary) . . (Overall Options) -c -S -E -o file -dumpbase dumpbase -dumpbase-ext auxdropsuf -dumpdir dumppfx -x language -v -### --help[=class[,...]] --target-help --version -pass-exit-codes -pipe -specs=file -wrapper @file -ffile-prefix-map=old=new -fcanon-prefix-map -fplugin=file -fplugin-arg-name=arg -fdump-ada-spec[-slim] -fada-spec-parent=unit -fdump-go-spec=file C (C Language Options) -ansi -std=standard -aux-info filename -fno-asm -fno-builtin -fno-builtin-function -fcond-mismatch -ffreestanding -fgimple -fgnu-tm -fgnu89-inline -fhosted -flax-vector-conversions -fms-extensions -fpermitted-flt-eval-methods=standard -fplan9-extensions -fsigned-bitfields -funsigned-bitfields -fsigned-char -funsigned-char -fstrict-flex-arrays[=n] -fsso-struct=endianness C++ (C++ Language Options) -fabi-version=n -fno-access-control -faligned-new=n -fno-assume-sane-operators-new-delete -fchar8_t -fcheck-new -fconcepts -fconstexpr-depth=n -fconstexpr-cache-depth=n -fconstexpr-loop-limit=n -fconstexpr-ops-limit=n -fno-elide-constructors -fno-enforce-eh-specs -fno-gnu-keywords -fno-immediate-escalation -fno-implicit-templates -fno-implicit-inline-templates -fno-implement-inlines -fmodule-header[=kind] -fmodule-only -fmodules -fmodule-implicit-inline -fno-module-lazy -fmodule-mapper=specification -fmodule-version-ignore -fms-extensions -fnew-inheriting-ctors -fnew-ttp-matching -fno-nonansi-builtins -fnothrow-opt -fno-operator-names -fno-optional-diags -fno-pretty-templates -frange-for-ext-temps -fno-rtti -fsized-deallocation -fstrong-eval-order[=kind] -ftemplate-backtrace-limit=n -ftemplate-depth=n -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ -fvisibility-inlines-hidden -fvisibility-ms-compat -fext-numeric-literals -flang-info-include-translate[=header] -flang-info-include-translate-not -flang-info-module-cmi[=module] -stdlib=libstdc++,libc++ -Wabi-tag -Wcatch-value -Wcatch-value=n -Wno-class-conversion -Wclass-memaccess -Wcomma-subscript -Wconditionally-supported -Wno-conversion-null -Wctad-maybe-unsupported -Wctor-dtor-privacy -Wdangling-reference -Wno-defaulted-function-deleted -Wno-delete-incomplete -Wdelete-non-virtual-dtor -Wno-deprecated-array-compare -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-deprecated-enum-enum-conversion -Wno-deprecated-enum-float-conversion -Weffc++ -Wno-elaborated-enum-base -Wno-exceptions -Wextra-semi -Wno-global-module -Wno-inaccessible-base -Wno-inherited-variadic-ctor -Wno-init-list-lifetime -Winvalid-constexpr -Winvalid-imported-macros -Wno-invalid-offsetof -Wno-literal-suffix -Wmismatched-new-delete -Wmismatched-tags -Wmultiple-inheritance -Wnamespaces -Wnarrowing -Wnoexcept -Wnoexcept-type -Wnon-virtual-dtor -Wpessimizing-move -Wno-placement-new -Wplacement-new=n -Wrange-loop-construct -Wredundant-move -Wredundant-tags -Wreorder -Wregister -Wstrict-null-sentinel -Wno-subobject-linkage -Wtemplates -Wno-non-template-friend -Wold-style-cast -Woverloaded-virtual -Wno-pmf-conversions -Wself-move -Wsign-promo -Wsized-deallocation -Wsuggest-final-methods -Wsuggest-final-types -Wsuggest-override -Wno-template-body -Wno-template-id-cdtor -Wtemplate-names-tu-local -Wno-terminate -Wno-vexing-parse -Wvirtual-inheritance -Wno-virtual-move-assign -Wvolatile Objective-C Objective-C++ (Objective-C and Objective-C++ Language Options) -fconstant-string-class=class-name -fgnu-runtime -fnext-runtime -fno-nil-receivers -fobjc-abi-version=n -fobjc-call-cxx-cdtors -fobjc-direct-dispatch -fobjc-exceptions -fobjc-gc -fobjc-nilcheck -fobjc-std=objc1 -fno-local-ivars -fivar-visibility=[public|protected|private|package] -freplace-objc-classes -fzero-link -gen-decls -Wassign-intercept -Wno-property-assign-default -Wno-protocol -Wobjc-root-class -Wselector -Wstrict-selector-match -Wundeclared-selector OpenMP OpenACC (OpenMP and OpenACC Options) -foffload=arg -foffload-options=arg -fopenacc -fopenacc-dim=geom -fopenmp -fopenmp-simd -fopenmp-target-simd-clone[=device-type] (Diagnostic Message Formatting Options) -fmessage-length=n -fdiagnostics-plain-output -fdiagnostics-show-location=[once|every-line] -fdiagnostics-color=[auto|never|always] -fdiagnostics-urls=[auto|never|always] -fdiagnostics-format=[text|sarif-stderr|sarif-file|json|json-stderr|json-file] -fdiagnostics-add-output=DIAGNOSTICS-OUTPUT-SPEC -fdiagnostics-set-output=DIAGNOSTICS-OUTPUT-SPEC -fno-diagnostics-json-formatting -fno-diagnostics-show-option -fno-diagnostics-show-caret -fno-diagnostics-show-event-links -fno-diagnostics-show-labels -fno-diagnostics-show-line-numbers -fno-diagnostics-show-cwe -fno-diagnostics-show-rules -fno-diagnostics-show-highlight-colors -fdiagnostics-minimum-margin-width=width -fdiagnostics-parseable-fixits -fdiagnostics-generate-patch -fdiagnostics-show-template-tree -fno-elide-type -fdiagnostics-path-format=[none|separate-events|inline-events] -fdiagnostics-show-path-depths -fno-show-column -fdiagnostics-column-unit=[display|byte] -fdiagnostics-column-origin=origin -fdiagnostics-escape-format=[unicode|bytes] -fdiagnostics-text-art-charset=[none|ascii|unicode|emoji] (Warning Options) -fsyntax-only -fmax-errors=n -Wpedantic -pedantic-errors -fpermissive -w -Wextra -Wall -Wabi=n -Waddress -Wno-address-of-packed-member -Waggregate-return -Walloc-size -Walloc-size-larger-than=byte-size -Walloc-zero -Walloca -Walloca-larger-than=byte-size -Wno-aggressive-loop-optimizations -Warith-conversion -Warray-bounds -Warray-bounds=n -Warray-compare -Warray-parameter -Warray-parameter=n -Wno-attributes -Wattribute-alias=n -Wno-attribute-alias -Wno-attribute-warning -Wbidi-chars=[none|unpaired|any|ucn] -Wbool-compare -Wbool-operation -Wno-builtin-declaration-mismatch -Wno-builtin-macro-redefined -Wc90-c99-compat -Wc99-c11-compat -Wc11-c23-compat -Wc23-c2y-compat -Wc++-compat -Wc++11-compat -Wc++14-compat -Wc++17-compat -Wc++20-compat -Wno-c++11-extensions -Wno-c++14-extensions -Wno-c++17-extensions -Wno-c++20-extensions -Wno-c++23-extensions -Wcalloc-transposed-args -Wcast-align -Wcast-align=strict -Wcast-function-type -Wcast-qual -Wchar-subscripts -Wclobbered -Wcomment -Wcompare-distinct-pointer-types -Wno-complain-wrong-lang -Wconversion -Wno-coverage-mismatch -Wno-cpp -Wdangling-else -Wdangling-pointer -Wdangling-pointer=n -Wdate-time -Wno-deprecated -Wno-deprecated-declarations -Wno-designated-init -Wdisabled-optimization -Wno-discarded-array-qualifiers -Wno-discarded-qualifiers -Wno-div-by-zero -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wempty-body -Wno-endif-labels -Wenum-compare -Wenum-conversion -Wenum-int-mismatch -Werror -Werror=* -Wexpansion-to-defined -Wfatal-errors -Wflex-array-member-not-at-end -Wfloat-conversion -Wfloat-equal -Wformat -Wformat=2 -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral -Wformat-overflow=n -Wformat-security -Wformat-signedness -Wformat-truncation=n -Wformat-y2k -Wframe-address -Wframe-larger-than=byte-size -Wno-free-nonheap-object -Wheader-guard -Wno-if-not-aligned -Wno-ignored-attributes -Wignored-qualifiers -Wno-incompatible-pointer-types -Whardened -Wimplicit -Wimplicit-fallthrough -Wimplicit-fallthrough=n -Wno-implicit-function-declaration -Wno-implicit-int -Winfinite-recursion -Winit-self -Winline -Wno-int-conversion -Wint-in-bool-context -Wno-int-to-pointer-cast -Wno-invalid-memory-model -Winvalid-pch -Winvalid-utf8 -Wno-unicode -Wjump-misses-init -Wlarger-than=byte-size -Wleading-whitespace=kind -Wlogical-not-parentheses -Wlogical-op -Wlong-long -Wno-lto-type-mismatch -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-attributes -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmusttail-local-addr -Wmaybe-musttail-local-addr -Wno-missing-profile -Wno-multichar -Wmultistatement-macros -Wnonnull -Wnonnull-compare -Wnormalized=[none|id|nfc|nfkc] -Wnull-dereference -Wno-odr -Wopenacc-parallelism -Wopenmp -Wopenmp-simd -Wno-overflow -Woverlength-strings -Wno-override-init-side-effects -Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded -Wparentheses -Wno-pedantic-ms-format -Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast -Wno-pragmas -Wno-pragma-once-outside-header -Wno-prio-ctor-dtor -Wno-psabi -Wredundant-decls -Wrestrict -Wno-return-local-addr -Wreturn-type -Wno-scalar-storage-order -Wsequence-point -Wshadow -Wshadow=global -Wshadow=local -Wshadow=compatible-local -Wno-shadow-ivar -Wno-shift-count-negative -Wno-shift-count-overflow -Wshift-negative-value -Wno-shift-overflow -Wshift-overflow=n -Wsign-compare -Wsign-conversion -Wno-sizeof-array-argument -Wsizeof-array-div -Wsizeof-pointer-div -Wsizeof-pointer-memaccess -Wstack-protector -Wstack-usage=byte-size -Wstrict-aliasing -Wstrict-aliasing=n -Wstrict-overflow -Wstrict-overflow=n -Wstring-compare -Wno-stringop-overflow -Wno-stringop-overread -Wno-stringop-truncation -Wstrict-flex-arrays -Wsuggest-attribute=attribute-name -Wswitch -Wno-switch-bool -Wswitch-default -Wswitch-enum -Wno-switch-outside-range -Wno-switch-unreachable -Wsync-nand -Wsystem-headers -Wtautological-compare -Wtrailing-whitespace -Wtrailing-whitespace=kind -Wtrampolines -Wtrigraphs -Wtrivial-auto-var-init -Wno-tsan -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas -Wunsuffixed-float-constants -Wunterminated-string-initialization -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-const-variable -Wunused-const-variable=n -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-macros -Wunused-parameter -Wno-unused-result -Wunused-value -Wunused-variable -Wuse-after-free -Wuse-after-free=n -Wuseless-cast -Wno-varargs -Wvariadic-macros -Wvector-operation-performance -Wvla -Wvla-larger-than=byte-size -Wno-vla-larger-than -Wvolatile-register-var -Wwrite-strings -Wno-xor-used-as-pow -Wzero-as-null-pointer-constant -Wzero-length-bounds.IP " (Static Analyzer Options)" 4 -fanalyzer -fanalyzer-call-summaries -fanalyzer-checker=name -fno-analyzer-feasibility -fanalyzer-fine-grained -fanalyzer-show-events-in-system-headers -fno-analyzer-state-merge -fno-analyzer-state-purge -fno-analyzer-suppress-followups -fanalyzer-transitivity -fno-analyzer-undo-inlining -fanalyzer-verbose-edges -fanalyzer-verbose-state-changes -fanalyzer-verbosity=level -fdump-analyzer -fdump-analyzer-callgraph -fdump-analyzer-exploded-graph -fdump-analyzer-exploded-nodes -fdump-analyzer-exploded-nodes-2 -fdump-analyzer-exploded-nodes-3 -fdump-analyzer-exploded-paths -fdump-analyzer-feasibility -fdump-analyzer-infinite-loop -fdump-analyzer-json -fdump-analyzer-state-purge -fdump-analyzer-stderr -fdump-analyzer-supergraph -fdump-analyzer-untracked -Wno-analyzer-double-fclose -Wno-analyzer-double-free -Wno-analyzer-exposure-through-output-file -Wno-analyzer-exposure-through-uninit-copy -Wno-analyzer-fd-access-mode-mismatch -Wno-analyzer-fd-double-close -Wno-analyzer-fd-leak -Wno-analyzer-fd-phase-mismatch -Wno-analyzer-fd-type-mismatch -Wno-analyzer-fd-use-after-close -Wno-analyzer-fd-use-without-check -Wno-analyzer-file-leak -Wno-analyzer-free-of-non-heap -Wno-analyzer-imprecise-fp-arithmetic -Wno-analyzer-infinite-loop -Wno-analyzer-infinite-recursion -Wno-analyzer-jump-through-null -Wno-analyzer-malloc-leak -Wno-analyzer-mismatching-deallocation -Wno-analyzer-null-argument -Wno-analyzer-null-dereference -Wno-analyzer-out-of-bounds -Wno-analyzer-overlapping-buffers -Wno-analyzer-possible-null-argument -Wno-analyzer-possible-null-dereference -Wno-analyzer-putenv-of-auto-var -Wno-analyzer-shift-count-negative -Wno-analyzer-shift-count-overflow -Wno-analyzer-stale-setjmp-buffer -Wno-analyzer-tainted-allocation-size -Wno-analyzer-tainted-assertion -Wno-analyzer-tainted-array-index -Wno-analyzer-tainted-divisor -Wno-analyzer-tainted-offset -Wno-analyzer-tainted-size -Wanalyzer-symbol-too-complex -Wanalyzer-too-complex -Wno-analyzer-undefined-behavior-ptrdiff -Wno-analyzer-undefined-behavior-strtok -Wno-analyzer-unsafe-call-within-signal-handler -Wno-analyzer-use-after-free -Wno-analyzer-use-of-pointer-in-stale-stack-frame -Wno-analyzer-use-of-uninitialized-value -Wno-analyzer-va-arg-type-mismatch -Wno-analyzer-va-list-exhausted -Wno-analyzer-va-list-leak -Wno-analyzer-va-list-use-after-va-end -Wno-analyzer-write-to-const -Wno-analyzer-write-to-string-literal C Objective-C (C and Objective-C-only Warning Options) -Wbad-function-cast -Wdeprecated-non-prototype -Wfree-labels -Wmissing-declarations -Wmissing-parameter-name -Wmissing-parameter-type -Wdeclaration-missing-parameter-type -Wmissing-prototypes -Wmissing-variable-declarations -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wstrict-prototypes -Wtraditional -Wtraditional-conversion -Wdeclaration-after-statement -Wpointer-sign (Debugging Options) -g -glevel -gdwarf -gdwarf-version -gbtf -gctf -gctflevel -gprune-btf -gno-prune-btf -ggdb -grecord-gcc-switches -gno-record-gcc-switches -gstrict-dwarf -gno-strict-dwarf -gas-loc-support -gno-as-loc-support -gas-locview-support -gno-as-locview-support -gcodeview -gcolumn-info -gno-column-info -gdwarf32 -gdwarf64 -gstatement-frontiers -gno-statement-frontiers -gvariable-location-views -gno-variable-location-views -ginternal-reset-location-views -gno-internal-reset-location-views -ginline-points -gno-inline-points -gvms -gz[=type] -gsplit-dwarf -gdescribe-dies -gno-describe-dies -fdebug-prefix-map=old=new -fdebug-types-section -fno-eliminate-unused-debug-types -femit-struct-debug-baseonly -femit-struct-debug-reduced -femit-struct-debug-detailed[=spec-list] -fno-eliminate-unused-debug-symbols -femit-class-debug-always -fno-merge-debug-strings -fno-dwarf2-cfi-asm -fvar-tracking -fvar-tracking-assignments (Optimization Options) -faggressive-loop-optimizations -falign-functions[=n[:m:[n2[:m2]]]] -falign-jumps[=n[:m:[n2[:m2]]]] -falign-labels[=n[:m:[n2[:m2]]]] -falign-loops[=n[:m:[n2[:m2]]]] -fmin-function-alignment=[n] -fno-allocation-dce -fallow-store-data-races -fassociative-math -fauto-profile -fauto-profile[=path] -fauto-inc-dec -fbranch-probabilities -fcaller-saves -fcombine-stack-adjustments -fconserve-stack -ffold-mem-offsets -fcompare-elim -fcprop-registers -fcrossjumping -fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules -fcx-limited-range -fdata-sections -fdce -fdelayed-branch -fdelete-null-pointer-checks -fdevirtualize -fdevirtualize-speculatively -fdevirtualize-at-ltrans -fdse -fearly-inlining -fipa-sra -fexpensive-optimizations -ffat-lto-objects -ffast-math -ffinite-math-only -ffloat-store -fexcess-precision=style -ffinite-loops -fforward-propagate -ffp-contract=style -ffunction-sections -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm -fgraphite-identity -fgcse-sm -fhoist-adjacent-loads -fif-conversion -fif-conversion2 -findirect-inlining -finline-stringops[=fn] -finline-functions -finline-functions-called-once -finline-limit=n -finline-small-functions -fipa-modref -fipa-cp -fipa-cp-clone -fipa-bit-cp -fipa-vrp -fipa-pta -fipa-profile -fipa-pure-const -fipa-reference -fipa-reference-addressable -fipa-reorder-for-locality -fipa-stack-alignment -fipa-icf -fira-algorithm=algorithm -flate-combine-instructions -flifetime-dse -flive-patching=level -fira-region=region -fira-hoist-pressure -fira-loop-pressure -fno-ira-share-save-slots -fno-ira-share-spill-slots -fisolate-erroneous-paths-dereference -fisolate-erroneous-paths-attribute -fivopts -fkeep-inline-functions -fkeep-static-functions -fkeep-static-consts -flimit-function-alignment -flive-range-shrinkage -floop-block -floop-interchange -floop-strip-mine -floop-unroll-and-jam -floop-nest-optimize -floop-parallelize-all -flra-remat -flto -flto-compression-level -flto-partition=alg -flto-incremental=path -flto-incremental-cache-size=n -fmalloc-dce -fmerge-all-constants -fmerge-constants -fmodulo-sched -fmodulo-sched-allow-regmoves -fmove-loop-invariants -fmove-loop-stores -fno-branch-count-reg -fno-defer-pop -fno-fp-int-builtin-inexact -fno-function-cse -fno-guess-branch-probability -fno-inline -fno-math-errno -fno-peephole -fno-peephole2 -fno-printf-return-value -fno-sched-interblock -fno-sched-spec -fno-signed-zeros -fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss -fomit-frame-pointer -foptimize-crc -foptimize-sibling-calls -fpartial-inlining -fpeel-loops -fpredictive-commoning -fprefetch-loop-arrays -fprofile-correction -fprofile-use -fprofile-use=path -fprofile-partial-training -fprofile-values -fprofile-reorder-functions -freciprocal-math -free -frename-registers -freorder-blocks -freorder-blocks-algorithm=algorithm -freorder-blocks-and-partition -freorder-functions -frerun-cse-after-loop -freschedule-modulo-scheduled-loops -frounding-math -fsave-optimization-record -fsched2-use-superblocks -fsched-pressure -fsched-spec-load -fsched-spec-load-dangerous -fsched-stalled-insns-dep[=n] -fsched-stalled-insns[=n] -fsched-group-heuristic -fsched-critical-path-heuristic -fsched-spec-insn-heuristic -fsched-rank-heuristic -fsched-last-insn-heuristic -fsched-dep-count-heuristic -fschedule-fusion -fschedule-insns -fschedule-insns2 -fsection-anchors -fselective-scheduling -fselective-scheduling2 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fsemantic-interposition -fshrink-wrap -fshrink-wrap-separate -fsignaling-nans -fsingle-precision-constant -fsplit-ivs-in-unroller -fsplit-loops -fsplit-paths -fsplit-wide-types -fsplit-wide-types-early -fssa-backprop -fssa-phiopt -fstdarg-opt -fstore-merging -fstrict-aliasing -fipa-strict-aliasing -fthread-jumps -ftracer -ftree-bit-ccp -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-coalesce-vars -ftree-copy-prop -ftree-cselim -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre -fcode-hoisting -ftree-loop-if-convert -ftree-loop-im -ftree-phiprop -ftree-loop-distribution -ftree-loop-distribute-patterns -ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize -ftree-loop-vectorize -ftree-parallelize-loops=n -ftree-pre -ftree-partial-pre -ftree-pta -ftree-reassoc -ftree-scev-cprop -ftree-sink -ftree-slsr -ftree-sra -ftree-switch-conversion -ftree-tail-merge -ftree-ter -ftree-vectorize -ftree-vrp -ftrivial-auto-var-init -funconstrained-commons -funit-at-a-time -funroll-all-loops -funroll-loops -funsafe-math-optimizations -funswitch-loops -fipa-ra -fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb -fwhole-program -fwpa -fuse-linker-plugin -fzero-call-used-regs --param name=value -O -O0 -O1 -O2 -O3 -Os -Ofast -Og -Oz.IP " (Program Instrumentation Options)" 4 -p -pg -fprofile-arcs --coverage -ftest-coverage -fcondition-coverage -fpath-coverage -fprofile-abs-path -fprofile-dir=path -fprofile-generate -fprofile-generate=path -fprofile-info-section -fprofile-info-section=name -fprofile-note=path -fprofile-prefix-path=path -fprofile-update=method -fprofile-filter-files=regex -fprofile-exclude-files=regex -fprofile-reproducible=[multithreaded|parallel-runs|serial] -fsanitize=style -fsanitize-recover -fsanitize-recover=style -fsanitize-trap -fsanitize-trap=style -fasan-shadow-offset=number -fsanitize-sections=s1,s2,... -fsanitize-undefined-trap-on-error -fbounds-check -fcf-protection -fcf-protection=[full|branch|return|none|check] -fharden-compares -fharden-conditional-branches -fhardened -fharden-control-flow-redundancy -fhardcfr-skip-leaf -fhardcfr-check-exceptions -fhardcfr-check-returning-calls -fhardcfr-check-noreturn-calls=[always|no-xthrow|nothrow|never] -fstack-protector -fstack-protector-all -fstack-protector-strong -fstack-protector-explicit -fstack-check -fstack-limit-register=reg -fstack-limit-symbol=sym -fno-stack-limit -fsplit-stack -fstrub=disable -fstrub=strict -fstrub=relaxed -fstrub=all -fstrub=at-calls -fstrub=internal -fvtable-verify=[std|preinit|none] -fvtv-counts -fvtv-debug -finstrument-functions -finstrument-functions-once -finstrument-functions-exclude-function-list=sym,sym,... -finstrument-functions-exclude-file-list=file,file,... -fprofile-prefix-map=old=new -fpatchable-function-entry=N[,M] (Preprocessor Options) -Aquestion=answer -A-question[=answer] -C -CC -Dmacro[=defn] -dD -dI -dM -dN -dU -fdebug-cpp -fdirectives-only -fdollars-in-identifiers -fexec-charset=charset -fextended-identifiers -finput-charset=charset -fmacro-prefix-map=old=new -fmax-include-depth=depth -fno-canonical-system-headers -fpch-deps -fpch-preprocess -fpreprocessed -ftabstop=width -ftrack-macro-expansion -fwide-exec-charset=charset -fworking-directory -H -imacros file -include file -M -MD -MF -MG -MM -MMD -MP -MQ -MT -Mno-modules -no-integrated-cpp -P -pthread -remap -traditional -traditional-cpp -trigraphs -Umacro -undef -Wp,option -Xpreprocessor option (Assembler Options) -Wa,option -Xassembler option (Linker Options) object-file-name -fuse-ld=linker -llibrary -nostartfiles -nodefaultlibs -nolibc -nostdlib -nostdlib++ -e entry --entry=entry -pie -pthread -r -rdynamic -s -static -static-pie -static-libgcc -static-libstdc++ -static-libasan -static-libtsan -static-liblsan -static-libubsan -shared -shared-libgcc -symbolic -T script -Wl,option -Xlinker option -u symbol -z keyword (Directory Options) -Bprefix -Idir -I- -idirafter dir -imacros file -imultilib dir -iplugindir=dir -iprefix file -iquote dir -isysroot dir -isystem dir -iwithprefix dir -iwithprefixbefore dir --embed-dir=dir -Ldir -no-canonical-prefixes --no-sysroot-suffix -nostdinc -nostdinc++ --sysroot=dir (Code Generation Options) -fcall-saved-reg -fcall-used-reg -ffixed-reg -fexceptions -fnon-call-exceptions -fdelete-dead-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-gnu-unique -finhibit-size-directive -fcommon -fno-ident -fpcc-struct-return -fpic -fPIC -fpie -fPIE -fno-plt -fno-jump-tables -fno-bit-tests -frecord-gcc-switches -freg-struct-return -fshort-enums -fshort-wchar -fverbose-asm -fpack-struct[=n] -fleading-underscore -ftls-model=model -fstack-reuse=reuse_level -ftrampolines -ftrampoline-impl=[stack|heap] -ftrapv -fwrapv -fvisibility=[default|internal|hidden|protected] -fstrict-volatile-bitfields -fsync-libcalls -fzero-init-padding-bits=value (Developer Options) -dletters -dumpspecs -dumpmachine -dumpversion -dumpfullversion -fcallgraph-info[=su,da] -fchecking -fchecking=n -fdbg-cnt-list -fdbg-cnt=counter-value-list -fdisable-ipa-pass_name -fdisable-rtl-pass_name -fdisable-rtl-pass-name=range-list -fdisable-tree-pass_name -fdisable-tree-pass-name=range-list -fdump-debug -fdump-earlydebug -fdump-noaddr -fdump-unnumbered -fdump-unnumbered-links -fdump-final-insns[=file] -fdump-ipa-all -fdump-ipa-cgraph -fdump-ipa-inline -fdump-lang-all -fdump-lang-switch -fdump-lang-switch-options -fdump-lang-switch-options=filename -fdump-passes -fdump-rtl-pass -fdump-rtl-pass=filename -fdump-statistics -fdump-tree-all -fdump-tree-switch -fdump-tree-switch-options -fdump-tree-switch-options=filename -fcompare-debug[=opts] -fcompare-debug-second -fenable-kind-pass -fenable-kind-pass=range-list -fira-verbose=n -flto-report -flto-report-wpa -fmem-report-wpa -fmem-report -fpre-ipa-mem-report -fpost-ipa-mem-report -fopt-info -fopt-info-options[=file] -fmultiflags -fprofile-report -frandom-seed=string -fsched-verbose=n -fsel-sched-verbose -fsel-sched-dump-cfg -fsel-sched-pipelining-verbose -fstats -fstack-usage -ftime-report -ftime-report-details -fvar-tracking-assignments-toggle -gtoggle -print-file-name=library -print-libgcc-file-name -print-multi-directory -print-multi-lib -print-multi-os-directory -print-prog-name=program -print-search-dirs -Q -print-sysroot -print-sysroot-headers-suffix -save-temps -save-temps=cwd -save-temps=obj -time[=file] (Machine-Dependent Options) AArch64 (AArch64 Options) -mabi=name -mbig-endian -mlittle-endian -mgeneral-regs-only -mcmodel=tiny -mcmodel=small -mcmodel=large -mstrict-align -mno-strict-align -momit-leaf-frame-pointer -mtls-dialect=desc -mtls-dialect=traditional -mtls-size=size -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -mlow-precision-recip-sqrt -mlow-precision-sqrt -mlow-precision-div -mpc-relative-literal-loads -msign-return-address=scope -mbranch-protection=none|standard|pac-ret[+leaf +b-key]|bti|gcs -mharden-sls=opts -march=name -mcpu=name -mtune=name -moverride=string -mverbose-cost-dump -mstack-protector-guard=guard -mstack-protector-guard-reg=sysreg -mstack-protector-guard-offset=offset -mtrack-speculation -moutline-atomics -mearly-ldp-fusion -mlate-ldp-fusion -Wexperimental-fmv-target Adapteva Epiphany (Adapteva Epiphany Options) -mhalf-reg-file -mprefer-short-insn-regs -mbranch-cost=num -mcmove -mnops=num -msoft-cmpsf -msplit-lohi -mpost-inc -mpost-modify -mstack-offset=num -mround-nearest -mlong-calls -mshort-calls -msmall16 -mfp-mode=mode -mvect-double -max-vect-align=num -msplit-vecmove-early -m1reg-reg AMD GCN (AMD GCN Options) -march=gpu -mtune=gpu -mstack-size=bytes ARC (ARC Options) -mbarrel-shifter -mjli-always -mcpu=cpu -mA6 -mARC600 -mA7 -mARC700 -mdpfp -mdpfp-compact -mdpfp-fast -mno-dpfp-lrsr -mea -mno-mpy -mmul32x16 -mmul64 -matomic -mnorm -mspfp -mspfp-compact -mspfp-fast -msimd -msoft-float -mswap -mcrc -mdsp-packa -mdvbf -mlock -mmac-d16 -mmac-24 -mrtsc -mswape -mtelephony -mxy -misize -mannotate-align -marclinux -marclinux_prof -mlong-calls -mmedium-calls -msdata -mirq-ctrl-saved -mrgf-banked-regs -mlpc-width=width -G num -mvolatile-cache -mtp-regno=regno -malign-call -mauto-modify-reg -mbbit-peephole -mno-brcc -mcase-vector-pcrel -mcompact-casesi -mno-cond-exec -mearly-cbranchsi -mexpand-adddi -mindexed-loads -mlra -mlra-priority-none -mlra-priority-compact -mlra-priority-noncompact -mmillicode -mmixed-code -mq-class -mRcq -mRcw -msize-level=level -mtune=cpu -mmultcost=num -mcode-density-frame -munalign-prob-threshold=probability -mmpy-option=multo -mdiv-rem -mcode-density -mll64 -mfpu=fpu -mrf16 -mbranch-index ARM (ARM Options) -mapcs-frame -mno-apcs-frame -mabi=name -mapcs-stack-check -mno-apcs-stack-check -mapcs-reentrant -mno-apcs-reentrant -mgeneral-regs-only -msched-prolog -mno-sched-prolog -mlittle-endian -mbig-endian -mbe8 -mbe32 -mfloat-abi=name -mfp16-format=name -mthumb-interwork -mno-thumb-interwork -mcpu=name -march=name -mfpu=name -mtune=name -mprint-tune-info -mstructure-size-boundary=n -mabort-on-noreturn -mlong-calls -mno-long-calls -msingle-pic-base -mno-single-pic-base -mpic-register=reg -mnop-fun-dllimport -mpoke-function-name -mthumb -marm -mflip-thumb -mtpcs-frame -mtpcs-leaf-frame -mcaller-super-interworking -mcallee-super-interworking -mtp=name -mtls-dialect=dialect -mword-relocations -mfix-cortex-m3-ldrd -mfix-cortex-a57-aes-1742098 -mfix-cortex-a72-aes-1655431 -munaligned-access -mneon-for-64bits -mslow-flash-data -masm-syntax-unified -mrestrict-it -mverbose-cost-dump -mpure-code -mcmse -mfix-cmse-cve-2021-35465 -mstack-protector-guard=guard -mstack-protector-guard-offset=offset -mfdpic -mbranch-protection=none|standard|pac-ret[+leaf] [+bti]|bti[+pac-ret[+leaf]] AVR (AVR Options) -mmcu=mcu -mabsdata -maccumulate-args -mcvt -mbranch-cost=cost -mfuse-add=level -mfuse-move=level -mfuse-move2 -mcall-prologues -mgas-isr-prologues -mint8 -mflmap -mdouble=bits -mlong-double=bits -mno-call-main -mn_flash=size -mfract-convert-truncate -mno-interrupts -mmain-is-OS_task -mrelax -mrmw -mstrict-X -mtiny-stack -mrodata-in-ram -msplit-bit-shift -msplit-ldst -mshort-calls -mskip-bug -muse-nonzero-bits -nodevicelib -nodevicespecs -Waddr-space-convert -Wmisspelled-isr Blackfin (Blackfin Options) -mcpu=cpu[-sirevision] -msim -momit-leaf-frame-pointer -mno-omit-leaf-frame-pointer -mspecld-anomaly -mno-specld-anomaly -mcsync-anomaly -mno-csync-anomaly -mlow-64k -mno-low64k -mstack-check-l1 -mid-shared-library -mno-id-shared-library -mshared-library-id=n -mleaf-id-shared-library -mno-leaf-id-shared-library -msep-data -mno-sep-data -mlong-calls -mno-long-calls -mfast-fp -minline-plt -mmulticore -mcorea -mcoreb -msdram -micplb C6X (C6X Options) -mbig-endian -mlittle-endian -march=cpu -msim -msdata=sdata-type CRIS (CRIS Options) -mcpu=cpu -march=cpu -mtune=cpu -mmax-stack-frame=n -metrax4 -metrax100 -mpdebug -mcc-init -mno-side-effects -mstack-align -mdata-align -mconst-align -m32-bit -m16-bit -m8-bit -mno-prologue-epilogue -melf -maout -sim -sim2 -mmul-bug-workaround -mno-mul-bug-workaround C-SKY (C-SKY Options) -march=arch -mcpu=cpu -mbig-endian -EB -mlittle-endian -EL -mhard-float -msoft-float -mfpu=fpu -mdouble-float -mfdivdu -mfloat-abi=name -melrw -mistack -mmp -mcp -mcache -msecurity -mtrust -mdsp -medsp -mvdsp -mdiv -msmart -mhigh-registers -manchor -mpushpop -mmultiple-stld -mconstpool -mstack-size -mccrt -mbranch-cost=n -mcse-cc -msched-prolog -msim Cygwin MinGW (Cygwin and MinGW Options) -mconsole -mcrtdll=library -mdll -mnop-fun-dllimport -mthread -municode -mwin32 -mwindows -fno-set-stack-executable Darwin (Darwin Options) -all_load -allowable_client -arch -arch_errors_fatal -arch_only -bind_at_load -bundle -bundle_loader -client_name -compatibility_version -current_version -dead_strip -dependency-file -dylib_file -dylinker_install_name -dynamic -dynamiclib -exported_symbols_list -filelist -flat_namespace -force_cpusubtype_ALL -force_flat_namespace -headerpad_max_install_names -iframework -image_base -init -install_name -keep_private_externs -multi_module -multiply_defined -multiply_defined_unused -noall_load -no_dead_strip_inits_and_terms -nodefaultrpaths -nofixprebinding -nomultidefs -noprebind -noseglinkedit -pagezero_size -prebind -prebind_all_twolevel_modules -private_bundle -read_only_relocs -sectalign -sectobjectsymbols -whyload -seg1addr -sectcreate -sectobjectsymbols -sectorder -segaddr -segs_read_only_addr -segs_read_write_addr -seg_addr_table -seg_addr_table_filename -seglinkedit -segprot -segs_read_only_addr -segs_read_write_addr -single_module -static -sub_library -sub_umbrella -twolevel_namespace -umbrella -undefined -unexported_symbols_list -weak_reference_mismatches -whatsloaded -F -gused -gfull -mmacosx-version-min=version -mkernel -mone-byte-bool DEC Alpha (DEC Alpha Options) -mno-fp-regs -msoft-float -mieee -mieee-with-inexact -mieee-conformant -mfp-trap-mode=mode -mfp-rounding-mode=mode -mtrap-precision=mode -mbuild-constants -mcpu=cpu-type -mtune=cpu-type -mbwx -mmax -mfix -mcix -msafe-bwa -msafe-partial -mfloat-vax -mfloat-ieee -mexplicit-relocs -msmall-data -mlarge-data -msmall-text -mlarge-text -mmemory-latency=time eBPF (eBPF Options) -mbig-endian -mlittle-endian -mframe-limit=bytes -mxbpf -mco-re -mno-co-re -mjmpext -mjmp32 -malu32 -mv3-atomics -mbswap -msdiv -msmov -mcpu=version -masm=dialect -minline-memops-threshold=bytes FR30 (FR30 Options) -msmall-model -mno-lsim FT32 (FT32 Options) -msim -mlra -mnodiv -mft32b -mcompress -mnopm FRV (FRV Options) -mgpr-32 -mgpr-64 -mfpr-32 -mfpr-64 -mhard-float -msoft-float -malloc-cc -mfixed-cc -mdword -mno-dword -mdouble -mno-double -mmedia -mno-media -mmuladd -mno-muladd -mfdpic -minline-plt -mgprel-ro -multilib-library-pic -mlinked-fp -mlong-calls -malign-labels -mlibrary-pic -macc-4 -macc-8 -mpack -mno-pack -mno-eflags -mcond-move -mno-cond-move -moptimize-membar -mno-optimize-membar -mscc -mno-scc -mcond-exec -mno-cond-exec -mvliw-branch -mno-vliw-branch -mmulti-cond-exec -mno-multi-cond-exec -mnested-cond-exec -mno-nested-cond-exec -mtomcat-stats -mTLS -mtls -mcpu=cpu GNU/Linux (GNU/Linux Options) -mglibc -muclibc -mmusl -mbionic -mandroid -tno-android-cc -tno-android-ld H8/300 (H8/300 Options) -mrelax -mh -ms -mn -mexr -mno-exr -mint32 -malign-300 HPPA (HPPA Options) -march=architecture-type -matomic-libcalls -mbig-switch -mcaller-copies -mdisable-fpregs -mdisable-indexing -mordered -mfast-indirect-calls -mgas -mgnu-ld -mhp-ld -mfixed-range=register-range -mcoherent-ldcw -mjump-in-delay -mlinker-opt -mlong-calls -mlong-load-store -mno-atomic-libcalls -mno-disable-fpregs -mno-disable-indexing -mno-fast-indirect-calls -mno-gas -mno-jump-in-delay -mno-long-load-store -mno-portable-runtime -mno-soft-float -mno-space-regs -msoft-float -mpa-risc-1-0 -mpa-risc-1-1 -mpa-risc-2-0 -mportable-runtime -mschedule=cpu-type -mspace-regs -msoft-mult -msio -mwsio -munix=unix-std -nolibdld -static -threads IA-64 (IA-64 Options) -mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic -mvolatile-asm-stop -mregister-names -msdata -mno-sdata -mconstant-gp -mauto-pic -mfused-madd -minline-float-divide-min-latency -minline-float-divide-max-throughput -mno-inline-float-divide -minline-int-divide-min-latency -minline-int-divide-max-throughput -mno-inline-int-divide -minline-sqrt-min-latency -minline-sqrt-max-throughput -mno-inline-sqrt -mdwarf2-asm -mearly-stop-bits -mfixed-range=register-range -mtls-size=tls-size -mtune=cpu-type -milp32 -mlp64 -msched-br-data-spec -msched-ar-data-spec -msched-control-spec -msched-br-in-data-spec -msched-ar-in-data-spec -msched-in-control-spec -msched-spec-ldc -msched-spec-control-ldc -msched-prefer-non-data-spec-insns -msched-prefer-non-control-spec-insns -msched-stop-bits-after-every-cycle -msched-count-spec-in-critical-path -msel-sched-dont-check-control-spec -msched-fp-mem-deps-zero-cost -msched-max-memory-insns-hard-limit -msched-max-memory-insns=max-insns LM32 (LM32 Options) -mbarrel-shift-enabled -mdivide-enabled -mmultiply-enabled -msign-extend-enabled -muser-enabled LoongArch (LoongArch Options) -march=arch-type -mtune=tune-type -mabi=base-abi-type -mfpu=fpu-type -msimd=simd-type -msoft-float -msingle-float -mdouble-float -mlsx -mno-lsx -mlasx -mno-lasx -mbranch-cost=n -maddr-reg-reg-cost=n -mcheck-zero-division -mno-check-zero-division -mcond-move-int -mno-cond-move-int -mcond-move-float -mno-cond-move-float -memcpy -mno-memcpy -mstrict-align -mno-strict-align -G num -mmax-inline-memcpy-size=n -mexplicit-relocs=style -mexplicit-relocs -mno-explicit-relocs -mdirect-extern-access -mno-direct-extern-access -mcmodel=code-model -mrelax -mpass-mrelax-to-as -mrecip -mrecip=opt -mfrecipe -mno-frecipe -mdiv32 -mno-div32 -mlam-bh -mno-lam-bh -mlamcas -mno-lamcas -mld-seq-sa -mno-ld-seq-sa -mtls-dialect=opt -mannotate-tablejump -mno-annotate-tablejump M32C (M32C Options) -mcpu=cpu -msim -memregs=number M32R/D (M32R/D Options) -m32r2 -m32rx -m32r -mdebug -malign-loops -mno-align-loops -missue-rate=number -mbranch-cost=number -mmodel=code-size-model-type -msdata=sdata-type -mno-flush-func -mflush-func=name -mno-flush-trap -mflush-trap=number -G num M680x0 (M680x0 Options) -march=arch -mcpu=cpu -mtune=tune -m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040 -m68060 -mcpu32 -m5200 -m5206e -m528x -m5307 -m5407 -mcfv4e -mbitfield -mno-bitfield -mc68000 -mc68020 -mnobitfield -mrtd -mno-rtd -mdiv -mno-div -mshort -mno-short -mhard-float -m68881 -msoft-float -mpcrel -malign-int -mstrict-align -msep-data -mno-sep-data -mshared-library-id=n -mid-shared-library -mno-id-shared-library -mxgot -mno-xgot -mlong-jump-table-offsets MCore (MCore Options) -mhardlit -mno-hardlit -mdiv -mno-div -mrelax-immediates -mno-relax-immediates -mwide-bitfields -mno-wide-bitfields -m4byte-functions -mno-4byte-functions -mcallgraph-data -mno-callgraph-data -mslow-bytes -mno-slow-bytes -mno-lsim -mlittle-endian -mbig-endian -m210 -m340 -mstack-increment MicroBlaze (MicroBlaze Options) -msoft-float -mhard-float -msmall-divides -mcpu=cpu -mmemcpy -mxl-soft-mul -mxl-soft-div -mxl-barrel-shift -mxl-pattern-compare -mxl-stack-check -mxl-gp-opt -mno-clearbss -mxl-multiply-high -mxl-float-convert -mxl-float-sqrt -mbig-endian -mlittle-endian -mxl-reorder -mxl-mode-app-model -mpic-data-is-text-relative MIPS (MIPS Options) -EL -EB -march=arch -mtune=arch -mips1 -mips2 -mips3 -mips4 -mips32 -mips32r2 -mips32r3 -mips32r5 -mips32r6 -mips64 -mips64r2 -mips64r3 -mips64r5 -mips64r6 -mips16 -mno-mips16 -mflip-mips16 -minterlink-compressed -mno-interlink-compressed -minterlink-mips16 -mno-interlink-mips16 -mabi=abi -mabicalls -mno-abicalls -mshared -mno-shared -mplt -mno-plt -mxgot -mno-xgot -mgp32 -mgp64 -mfp32 -mfpxx -mfp64 -mhard-float -msoft-float -mno-float -msingle-float -mdouble-float -modd-spreg -mno-odd-spreg -mabs=mode -mnan=encoding -mdsp -mno-dsp -mdspr2 -mno-dspr2 -mmcu -mmno-mcu -meva -mno-eva -mvirt -mno-virt -mxpa -mno-xpa -mcrc -mno-crc -mginv -mno-ginv -mmicromips -mno-micromips -mmsa -mno-msa -mloongson-mmi -mno-loongson-mmi -mloongson-ext -mno-loongson-ext -mloongson-ext2 -mno-loongson-ext2 -mfpu=fpu-type -msmartmips -mno-smartmips -mpaired-single -mno-paired-single -mdmx -mno-mdmx -mips3d -mno-mips3d -mmt -mno-mt -mllsc -mno-llsc -mlong64 -mlong32 -msym32 -mno-sym32 -Gnum -mlocal-sdata -mno-local-sdata -mextern-sdata -mno-extern-sdata -mgpopt -mno-gopt -membedded-data -mno-embedded-data -muninit-const-in-rodata -mno-uninit-const-in-rodata -mcode-readable=setting -msplit-addresses -mno-split-addresses -mexplicit-relocs -mno-explicit-relocs -mexplicit-relocs=release -mcheck-zero-division -mno-check-zero-division -mdivide-traps -mdivide-breaks -mload-store-pairs -mno-load-store-pairs -mstrict-align -mno-strict-align -mno-unaligned-access -munaligned-access -mmemcpy -mno-memcpy -mlong-calls -mno-long-calls -mmad -mno-mad -mimadd -mno-imadd -mfused-madd -mno-fused-madd -nocpp -mfix-24k -mno-fix-24k -mfix-r4000 -mno-fix-r4000 -mfix-r4400 -mno-fix-r4400 -mfix-r5900 -mno-fix-r5900 -mfix-r10000 -mno-fix-r10000 -mfix-rm7000 -mno-fix-rm7000 -mfix-vr4120 -mno-fix-vr4120 -mfix-vr4130 -mno-fix-vr4130 -mfix-sb1 -mno-fix-sb1 -mflush-func=func -mno-flush-func -mbranch-cost=num -mbranch-likely -mno-branch-likely -mcompact-branches=policy -mfp-exceptions -mno-fp-exceptions -mvr4130-align -mno-vr4130-align -msynci -mno-synci -mlxc1-sxc1 -mno-lxc1-sxc1 -mmadd4 -mno-madd4 -mrelax-pic-calls -mno-relax-pic-calls -mmcount-ra-address -mframe-header-opt -mno-frame-header-opt MMIX (MMIX Options) -mlibfuncs -mno-libfuncs -mepsilon -mno-epsilon -mabi=gnu -mabi=mmixware -mzero-extend -mknuthdiv -mtoplevel-symbols -melf -mbranch-predict -mno-branch-predict -mbase-addresses -mno-base-addresses -msingle-exit -mno-single-exit MN10300 (MN10300 Options) -mmult-bug -mno-mult-bug -mno-am33 -mam33 -mam33-2 -mam34 -mtune=cpu-type -mreturn-pointer-on-d0 -mno-crt0 -mrelax -mliw -msetlb Moxie (Moxie Options) -meb -mel -mmul.x -mno-crt0 MSP430 (MSP430 Options) -msim -masm-hex -mmcu= -mcpu= -mlarge -msmall -mrelax -mwarn-mcu -mcode-region= -mdata-region= -msilicon-errata= -msilicon-errata-warn= -mhwmult= -minrt -mtiny-printf -mmax-inline-shift= NDS32 (NDS32 Options) -mbig-endian -mlittle-endian -mreduced-regs -mfull-regs -mcmov -mno-cmov -mext-perf -mno-ext-perf -mext-perf2 -mno-ext-perf2 -mext-string -mno-ext-string -mv3push -mno-v3push -m16bit -mno-16bit -misr-vector-size=num -mcache-block-size=num -march=arch -mcmodel=code-model -mctor-dtor -mrelax Nvidia PTX (Nvidia PTX Options) -m64 -mmainkernel -moptimize OpenRISC (OpenRISC Options) -mboard=name -mnewlib -mhard-mul -mhard-div -msoft-mul -msoft-div -msoft-float -mhard-float -mdouble-float -munordered-float -mcmov -mror -mrori -msext -msfimm -mshftimm -mcmodel=code-model PDP-11 (PDP-11 Options) -mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10 -mint32 -mno-int16 -mint16 -mno-int32 -msplit -munix-asm -mdec-asm -mgnu-asm -mlra PowerPC RS/6000 PowerPC . PRU (PRU Options) -mmcu=mcu -minrt -mno-relax -mloop -mabi=variant RISC-V (RISC-V Options) -mbranch-cost=N-instruction -mplt -mno-plt -mabi=ABI-string -mfdiv -mno-fdiv -mfence-tso -mno-fence-tso -mdiv -mno-div -misa-spec=ISA-spec-string -march=ISA-string -mtune=processor-string -mpreferred-stack-boundary=num -msmall-data-limit=N-bytes -msave-restore -mno-save-restore -mshorten-memrefs -mno-shorten-memrefs -mstrict-align -mno-strict-align -mcmodel=medlow -mcmodel=medany -mcmodel=large -mexplicit-relocs -mno-explicit-relocs -mrelax -mno-relax -mriscv-attribute -mno-riscv-attribute -malign-data=type -mbig-endian -mlittle-endian -mstack-protector-guard=guard -mstack-protector-guard-reg=reg -mstack-protector-guard-offset=offset -mcsr-check -mno-csr-check -mmovcc -mno-movcc -minline-atomics -mno-inline-atomics -minline-strlen -mno-inline-strlen -minline-strcmp -mno-inline-strcmp -minline-strncmp -mno-inline-strncmp -mtls-dialect=desc -mtls-dialect=trad RL78 (RL78 Options) -msim -mmul=none -mmul=g13 -mmul=g14 -mallregs -mcpu=g10 -mcpu=g13 -mcpu=g14 -mg10 -mg13 -mg14 -m64bit-doubles -m32bit-doubles -msave-mduc-in-interrupts RS/6000 PowerPC (RS/6000 and PowerPC Options) -mcpu=cpu-type -mtune=cpu-type -mcmodel=code-model -mpowerpc64 -maltivec -mno-altivec -mpowerpc-gpopt -mno-powerpc-gpopt -mpowerpc-gfxopt -mno-powerpc-gfxopt -mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mpopcntd -mno-popcntd -mfprnd -mno-fprnd -mcmpb -mno-cmpb -mhard-dfp -mno-hard-dfp -mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc -m64 -m32 -mxl-compat -mno-xl-compat -mpe -malign-power -malign-natural -msoft-float -mhard-float -mmultiple -mno-multiple -mupdate -mno-update -mavoid-indexed-addresses -mno-avoid-indexed-addresses -mfused-madd -mno-fused-madd -mbit-align -mno-bit-align -mstrict-align -mno-strict-align -mrelocatable -mno-relocatable -mrelocatable-lib -mno-relocatable-lib -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian -mdynamic-no-pic -mswdiv -msingle-pic-base -mprioritize-restricted-insns=priority -msched-costly-dep=dependence_type -minsert-sched-nops=scheme -mcall-aixdesc -mcall-eabi -mcall-freebsd -mcall-linux -mcall-netbsd -mcall-openbsd -mcall-sysv -mcall-sysv-eabi -mcall-sysv-noeabi -mtraceback=traceback_type -maix-struct-return -msvr4-struct-return -mabi=abi-type -msecure-plt -mbss-plt -msplit-patch-nops -mlongcall -mno-longcall -mpltseq -mno-pltseq -mblock-move-inline-limit=num -mblock-compare-inline-limit=num -mblock-compare-inline-loop-limit=num -mno-block-ops-unaligned-vsx -mstring-compare-inline-limit=num -misel -mno-isel -mvrsave -mno-vrsave -mmulhw -mno-mulhw -mdlmzb -mno-dlmzb -mprototype -mno-prototype -msim -mmvme -mads -myellowknife -memb -msdata -msdata=opt -mreadonly-in-sdata -mvxworks -G num -mrecip -mrecip=opt -mno-recip -mrecip-precision -mno-recip-precision -mveclibabi=type -mfriz -mno-friz -mpointers-to-nested-functions -mno-pointers-to-nested-functions -msave-toc-indirect -mno-save-toc-indirect -mpower8-fusion -mno-mpower8-fusion -mcrypto -mno-crypto -mhtm -mno-htm -mquad-memory -mno-quad-memory -mquad-memory-atomic -mno-quad-memory-atomic -mcompat-align-parm -mno-compat-align-parm -mfloat128 -mno-float128 -mfloat128-hardware -mno-float128-hardware -mgnu-attribute -mno-gnu-attribute -mstack-protector-guard=guard -mstack-protector-guard-reg=reg -mstack-protector-guard-offset=offset -mprefixed -mno-prefixed -mpcrel -mno-pcrel -mmma -mno-mmma -mrop-protect -mno-rop-protect -mprivileged -mno-privileged RX (RX Options) -m64bit-doubles -m32bit-doubles -fpu -nofpu -mcpu= -mbig-endian-data -mlittle-endian-data -msmall-data -msim -mno-sim -mas100-syntax -mno-as100-syntax -mrelax -mmax-constant-size= -mint-register= -mpid -mallow-string-insns -mno-allow-string-insns -mjsr -mno-warn-multiple-fast-interrupts -msave-acc-in-interrupts S/390 zSeries (S/390 and zSeries Options) -mtune=cpu-type -march=cpu-type -mhard-float -msoft-float -mhard-dfp -mno-hard-dfp -mlong-double-64 -mlong-double-128 -mbackchain -mno-backchain -mpacked-stack -mno-packed-stack -msmall-exec -mno-small-exec -mmvcle -mno-mvcle -m64 -m31 -mdebug -mno-debug -mesa -mzarch -mhtm -mvx -mzvector -mtpf-trace -mno-tpf-trace -mtpf-trace-skip -mno-tpf-trace-skip -mfused-madd -mno-fused-madd -mwarn-framesize -mwarn-dynamicstack -mstack-size -mstack-guard -mhotpatch=halfwords,halfwords SH (SH Options) -m1 -m2 -m2e -m2a-nofpu -m2a-single-only -m2a-single -m2a -m3 -m3e -m4-nofpu -m4-single-only -m4-single -m4 -m4a-nofpu -m4a-single-only -m4a-single -m4a -m4al -mb -ml -mdalign -mrelax -mbigtable -mfmovd -mrenesas -mno-renesas -mnomacsave -mieee -mno-ieee -mbitops -misize -minline-ic_invalidate -mpadstruct -mprefergot -musermode -multcost=number -mdiv=strategy -mdivsi3_libfunc=name -mfixed-range=register-range -maccumulate-outgoing-args -matomic-model=atomic-model -mbranch-cost=num -mzdcbranch -mno-zdcbranch -mcbranch-force-delay-slot -mfused-madd -mno-fused-madd -mfsca -mno-fsca -mfsrra -mno-fsrra -mpretend-cmove -mtas Solaris 2 (Solaris 2 Options) -mclear-hwcap -mno-clear-hwcap -mimpure-text -mno-impure-text -pthreads SPARC (SPARC Options) -mcpu=cpu-type -mtune=cpu-type -mcmodel=code-model -mmemory-model=mem-model -m32 -m64 -mapp-regs -mno-app-regs -mfaster-structs -mno-faster-structs -mflat -mno-flat -mfpu -mno-fpu -mhard-float -msoft-float -mhard-quad-float -msoft-quad-float -mstack-bias -mno-stack-bias -mstd-struct-return -mno-std-struct-return -munaligned-doubles -mno-unaligned-doubles -muser-mode -mno-user-mode -mv8plus -mno-v8plus -mvis -mno-vis -mvis2 -mno-vis2 -mvis3 -mno-vis3 -mvis3b -mno-vis3b -mvis4 -mno-vis4 -mvis4b -mno-vis4b -mcbcond -mno-cbcond -mfmaf -mno-fmaf -mfsmuld -mno-fsmuld -mpopc -mno-popc -msubxc -mno-subxc -mfix-at697f -mfix-ut699 -mfix-ut700 -mfix-gr712rc System V (System V Options) -Qy -Qn -YP,paths -Ym,dir V850 (V850 Options) -mlong-calls -mno-long-calls -mep -mno-ep -mprolog-function -mno-prolog-function -mspace -mtda=n -msda=n -mzda=n -mapp-regs -mno-app-regs -mdisable-callt -mno-disable-callt -mv850e2v3 -mv850e2 -mv850e1 -mv850es -mv850e -mv850 -mv850e3v5 -mloop -mrelax -mlong-jumps -msoft-float -mhard-float -mgcc-abi -mrh850-abi -mbig-switch VAX (VAX Options) -munix -mgnu -md -md-float -mg -mg-float -mlra Visium (Visium Options) -mdebug -msim -mfpu -mno-fpu -mhard-float -msoft-float -mcpu=cpu-type -mtune=cpu-type -msv-mode -muser-mode VMS (VMS Options) -mvms-return-codes -mdebug-main=prefix -mmalloc64 -mpointer-size=size VxWorks (VxWorks Options) -mrtp -msmp -non-static -Bstatic -Bdynamic -Xbind-lazy -Xbind-now x86 (x86 Options) -mtune=cpu-type -march=cpu-type -mtune-ctrl=feature-list -mdump-tune-features -mno-default -mfpmath=unit -masm=dialect -mno-fancy-math-387 -mno-fp-ret-in-387 -m80387 -mhard-float -msoft-float -mno-wide-multiply -mrtd -malign-double -mpreferred-stack-boundary=num -mincoming-stack-boundary=num -mcld -mcx16 -msahf -mmovbe -mcrc32 -mmwait -mrecip -mrecip=opt -mvzeroupper -mprefer-avx128 -mprefer-vector-width=opt -mpartial-vector-fp-math -mmove-max=bits -mstore-max=bits -mnoreturn-no-callee-saved-registers -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 -mavx -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512ifma -mavx512vbmi -msha -maes -mpclmul -mfsgsbase -mrdrnd -mf16c -mfma -mpconfig -mwbnoinvd -mptwrite -mclflushopt -mclwb -mxsavec -mxsaves -msse4a -m3dnow -m3dnowa -mpopcnt -mabm -mbmi -mtbm -mfma4 -mxop -madx -mlzcnt -mbmi2 -mfxsr -mxsave -mxsaveopt -mrtm -mhle -mlwp -mmwaitx -mclzero -mpku -mthreads -mgfni -mvaes -mwaitpkg -mshstk -mmanual-endbr -mcet-switch -mforce-indirect-call -mavx512vbmi2 -mavx512bf16 -menqcmd -mvpclmulqdq -mavx512bitalg -mmovdiri -mmovdir64b -mavx512vpopcntdq -mavx512vnni -mprfchw -mrdpid -mrdseed -msgx -mavx512vp2intersect -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -muintr -mhreset -mavxvnni -mamx-fp8 -mavx512fp16 -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 -mprefetchi -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mapxf -musermsr -mavx10.1 -mavx10.1-256 -mavx10.1-512 -mevex512 -mavx10.2 -mamx-avx512 -mamx-tf32 -mamx-transpose -mmovrs -mamx-movrs -mcldemote -mms-bitfields -mno-align-stringops -minline-all-stringops -minline-stringops-dynamically -mstringop-strategy=alg -mkl -mwidekl -mmemcpy-strategy=strategy -mmemset-strategy=strategy -mpush-args -maccumulate-outgoing-args -m128bit-long-double -m96bit-long-double -mlong-double-64 -mlong-double-80 -mlong-double-128 -mregparm=num -msseregparm -mveclibabi=type -mvect8-ret-in-mem -mpc32 -mpc64 -mpc80 -mdaz-ftz -mstackrealign -momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs -mcmodel=code-model -mabi=name -maddress-mode=mode -m32 -m64 -mx32 -m16 -miamcu -mlarge-data-threshold=num -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv -minstrument-return=type -mfentry-name=name -mfentry-section=name -mavx256-split-unaligned-load -mavx256-split-unaligned-store -malign-data=type -mstack-protector-guard=guard -mstack-protector-guard-reg=reg -mstack-protector-guard-offset=offset -mstack-protector-guard-symbol=symbol -mgeneral-regs-only -mcall-ms2sysv-xlogues -mrelax-cmpxchg-loop -mindirect-branch=choice -mfunction-return=choice -mindirect-branch-register -mharden-sls=choice -mindirect-branch-cs-prefix -mneeded -mno-direct-extern-access -munroll-only-small-loops -mlam=choice x86 Windows Cygwin MinGW . Xstormy16 (Xstormy16 Options) -msim Xtensa (Xtensa Options) -mconst16 -mno-const16 -mfused-madd -mno-fused-madd -mforce-no-pic -mserialize-volatile -mno-serialize-volatile -mtext-section-literals -mno-text-section-literals -mauto-litpools -mno-auto-litpools -mtarget-align -mno-target-align -mlongcalls -mno-longcalls -mabi=abi-type -mextra-l32r-costs=cycles -mstrict-align -mno-strict-align zSeries S/390 zSeries ..SS " (Options Controlling the Kind of Output)" : . GCC (object file) ( ) . : file.c C . file.i C . file.ii C++ . file.m Objective-C. Objective-C libobjc . file.mi Objective-C . file.mm file.M Objective-C++. Objective-C++ libobjc . .M M . file.mii Objective-C++ . file.h C C++ Objective-C Objective-C++ () C C++ Ada ( -fdump-ada-spec). file.cc file.cp file.cxx file.cpp file.CPP file.c++ file.C C++ . .cxx x . .C C . file.mm file.M Objective-C++ . file.mii Objective-C++ . file.hh file.H file.hp file.hxx file.hpp file.HPP file.h++ file.tcc C++ Ada. file.f file.for file.ftn file.fi (fixed form) . file.F file.FOR file.fpp file.FPP file.FTN (fixed form) ( ). file.f90 file.f95 file.f03 file.f08 file.fii (free form) . file.F90 file.F95 file.F03 file.F08 (free form) ( ). file.cob file.COB file.cbl file.CBL COBOL. file.go Go. file.d D. file.di D. file.dd D (Ddoc). file.ads Ada ( ) ( ) . specs . file.adb Ada ( ). bodies . file.s . file.S file.sx . other . . -x : -x language (language) ( ). -x . language : c c-header cpp-output c++ c++-header c++-system-header c++-user-header c++-cpp-output objective-c objective-c-header objective-c-cpp-output objective-c++ objective-c++-header objective-c++-cpp-output assembler assembler-with-cpp ada cobol d f77 f77-cpp-input f95 f95-cpp-input go -x . -x f77 -std=legacy ..IP "-x none" 4 ( -x ). -x ( ) gcc -c -S -E gcc . ( -x cpp-output -E) gcc . -c (link) . . (object file) . .c .i .s .o . . -S . . .c .i .s . . -E . . . -o file file . . -o a.out source.suffix source.o source.s source.suffix.gch . -o (auxiliary) (dump) . . (override) . . (base name) . ( ) (-) . gcc -c foo.c ... foo.o foo.dwo -gsplit-dwarf foo.c.???r.final -fdump-rtl-final. : gcc -c foo.c -o dir/foobar.o ... dir/foobar.* dir/foobar.c.* . : gcc foo.c bar.c -o dir/foobar ... dir/foobar-foo.* dir/foobar-bar.* dir/foobar-foo.c.* dir/foobar-bar.c.* . : gcc foo.c -o dir/foo ... dir/foo.* dir/foo.c.* . -dumpbase -dumpbase-ext -dumpdir -save-temps=cwd -save-temps=obj . -dumpbase dumpbase . . : gcc -save-temps -S foo.c () foo.i () foo.s : gcc -save-temps -dumpbase save-foo -c foo.c save-foo.i save-foo.s ( ) () foo.o . () : ( -fdump-*) ( "-save-temps" "-gsplit-dwarf" "-fcallgraph-info") . -dumpbase basename.suf -dumpbase-ext .suf . dumpbase dumppfx ( -dumpdir -save-temps=*) dumpbase (override) : gcc foo.c -c -o dir/foo.o -dumpbase alt/foo \ -dumpdir pfx- -save-temps=cwd ... alt/foo.* dir/ -o ./ -save-temps=cwd pfx- -dumpdir . -dumpbase dumppfx -dumpdir . dumppfx dumpbase auxdropsuf : gcc foo.c bar.c -c -dumpbase main ... foo.o bar.o dumpbase main-foo.* main-bar.* . dumpbase : gcc -c foo.c -o dir/foobar.o -dumpbase " ... dir/foo.* dir/foo.c.* . . dumpbase : gcc foo.c bar.c -o dir/foobar -dumpbase " -flto ... dir/foo.* dir/bar.* dir/foo.c.* dir/bar.c.* . LTO dir/foobar. . -dumpbase-ext auxdropsuf ( ) auxdropsuf dumpbase . dumpbase -dumpbase dumpbase dumppfx . gcc foo.c -c -o dir/foo.o -dumpbase x-foo.c -dumpbase-ext .c ... dir/foo.o dir/x-foo.* .c dumpbase . : dir/x-foo.c.*. dumpbase dumppfx : gcc foo.c bar.c -o main.out -dumpbase-ext .out ... main.out auxdropsuf main-foo.* main-bar.* main-foo.c.* main-bar.c.* ..IP "-dumpdir dumppfx" 4 dump dumppfx : gcc -dumpdir pfx- -c foo.c ... foo.o pfx-foo.* dumppfx dumpbase ( ) . dump : pfx-foo.c.*. dumppfx : gcc -dumpdir dir/ -c foo.c -o obj/bar.o ... obj/bar.o dir/bar.* dumppfx dumpbase . dump : dir/bar.c.*. "/dev/null" . -save-temps=cwd -save-temps=obj -dumpdir . : gcc -dumpdir pfx- -c foo.c -save-temps=obj ... foo.o foo.* -save-temps=* dumppfx -dumpdir . =obj -save-temps . dump foo.c.* . -dumpbase dumpbase auxdropsuf dumppfx ( ) aux dump . gcc foo.c bar.c -c -dumpdir dir/pfx- -dumpbase main ... dump dir/pfx-main-foo.* dir/pfx-main-bar.* dumpbase- dumppfx . dump : dir/pfx-main-foo.c.* dir/pfx-main-bar.c.*. : gcc foo.c -c -dumpdir dir/pfx- -dumpbase main ... -dumpbase dumpbase . dump dir/pfx-main.* . dumppfx dumpbase- ( foo.c bar.c -c). -dumpdir -dumpbase auxdropsuf dumppfx . : gcc foo.c bar.c -dumpdir dir/pfx- -o main ... main dumppfx -dumpdir . dumppfx -dumpbase . dumppfx . -dumpdir -save-temps=* : gcc foo.c -dumpdir alt/pfx- -o dir/main.exe -save-temps=cwd ... foo.* dump foo.c.* -save-temps=cwd . : (basename) dumppfx -dumpdir -save-temps=* dumpbase -dumpbase . dumpbase dumppfx . dumppfx dumpbase dump dumpbase . dump LTO dumppfx dumpbase ( ) -dumpdir lto-wrapper -dumpbase -dumpbase-ext . lto-wrapper LTO dumppfx -dumpdir -dumpbase . -v ( ) . . -### -v - "./-_" . . --help gcc ( ) . -v --help gcc . -Wextra ( --help) . --target-help ( ) . . --help={class|[^]qualifier}[,...] ( ) . : optimizers . warnings . target . --target-help . --help= . params --param . language language language GCC . common . common . : undocumented . joined : --help=target. separate : -o output-file. : --help=target,undocumented ^ ( ) : --help=warnings,^joined,^undocumented --help= . . target . : --help=target,optimizers --help= . . --help --help= . -Q --help= --help= . ( --help= ). ARM gcc : % gcc -Q -mabi=2 --help=target -c The following options are target specific: -mabi= 2 -mabort-on-noreturn [disabled] -mapcs [disabled] -O2 : -Q -O2 --help=optimizers -O3 : gcc -c -Q -O3 --help=optimizers > /tmp/O3-opts gcc -c -Q -O2 --help=optimizers > /tmp/O2-opts diff /tmp/O2-opts /tmp/O3-opts | grep enabled () GCC . -pass-exit-codes gcc . -pass-exit-codes gcc . (front ends) C C++ Fortran . -pipe . GNU . -specs=file file specs (driver) gcc cc1 cc1plus as ld . -specs=file . -wrapper (wrapper). . gcc -c t.c -wrapper gdb,--args gcc gdb --args cc1 gdb --args cc1 ... . -ffile-prefix-map=old=new old new . -f*-prefix-map . (reproducible builds) . (directives) . -fmacro-prefix-map -fdebug-prefix-map -fprofile-prefix-map -fcanon-prefix-map . -fcanon-prefix-map -f*-prefix-map old DOS . -fcanon-prefix-map (canonicalized) old . -fplugin=name.so (plugin) name.so (shared object) dlopen . (base name) ( -fplugin-arg-name-key=value ). (callback functions) Plugins API . -fplugin-arg-name-key=value key value name. -fdump-ada-spec[-slim] (include) C C++ (specs) Ada . -fada-spec-parent=unit -fdump-ada-spec[-slim] Ada unit . -fdump-go-spec=file (declarations) Go file . "const" "type" "var" "func" Go Go . @file file. @file . file . file (whitespace) . . ( ) . file @file . C++ (Compiling C++ Programs) C++ .C .cc .cpp .CPP .c++ .cp .cxx (header) C++ .hh .hpp .H ( ) .tcc C++ .ii C++20 .ixx .cppm .cxxm .c++m .ccm . GCC C++ C ( gcc) . gcc C++ . g++ GCC C++ . .c .h .i C C++ -x . C .h C++ . g++ c++ . C++ C C++ ..SS " C (Options Controlling C Dialect)" C ( C C++ Objective-C Objective-C++) : -ansi C -std=c90 . C++ -std=c++98 . -std= . C C++ . c90 c++98 GNU gnu90 gnu++98 . GNU . -std=c90 GCC ISO C90 ( "asm" "typeof") GNU ISO C90 ( "?:") . GNU . . -Wpedantic GNU . -std=gnu90 -Wpedantic C++ // -std=gnu99 -Wpedantic . : c90 c89 iso9899:1990 ISO C90 ( GNU ISO C90 ). -ansi C. iso9899:199409 ISO C90 (amendment 1) . c99 c9x iso9899:1999 iso9899:199x ISO C99. ( C99 F G). . c9x iso9899:199x . c11 c1x iso9899:2011 ISO C11 ISO C. ( C11 F G) K ( - Bounds-checking interfaces) L ( - Analyzability). c1x . c17 c18 iso9899:2017 iso9899:2018 ISO C17 ISO C ( ). C11 ( -std=c11 ) "__STDC_VERSION__" C11 . c23 c2x iso9899:2024 ISO C23 ISO C ( ). c2x . c2y ISO C . . gnu90 gnu89 GNU ISO C90 ( C99). gnu99 gnu9x GNU ISO C99. gnu9x . gnu11 gnu1x GNU ISO C11. gnu1x . gnu17 gnu18 GNU ISO C17. gnu23 gnu2x GNU ISO C23. C . gnu2x . gnu2y ISO C GNU. . gnu2x . c++98 c++03 ISO C++ . -ansi C++. gnu++98 gnu++03 GNU -std=c++98. c++11 c++0x ISO C++ . c++0x . gnu++11 gnu++0x GNU -std=c++11. gnu++0x . c++14 c++1y ISO C++ . c++1y . gnu++14 gnu++1y GNU -std=c++14. gnu++1y . c++17 c++1z ISO C++ . c++1z ..IP gnu++17 4 gnu++1z GNU -std=c++17. C++ . gnu++1z . c++20 c++2a ISO C++ . . c++2a . gnu++20 gnu++2a GNU -std=c++20. . gnu++2a . c++23 c++2b ISO C++ ( ). . c++2b . gnu++23 gnu++2b GNU -std=c++23. . gnu++2b . c++2c c++26 ISO C++ . . gnu++2c gnu++26 GNU -std=c++2c. . -aux-info filename (prototyped) / filename . C . () ( ) (I N O ) (C F ) . K&R . -fno-asm "asm" "inline" "typeof" (identifier) . "__asm__" "__inline__" "__typeof__" . C -ansi -fno-asm . C++ "inline" . -fno-gnu-keywords "typeof" "asm" "inline" . C99 (-std=c99 -std=gnu99) "asm" "typeof" "inline" ISO C99 . C23 (-std=c23 -std=gnu23) "asm" "typeof" ISO C23 . -fno-builtin -fno-builtin-function (built-in) __builtin_ . GCC "alloca" "memcpy" (inline) . (breakpoint) . GCC . -Wformat "printf" "printf" "strlen" . -fno-builtin-function function . function __builtin_ . GCC . -fbuiltin-function -fno-builtin -ffreestanding : #define abs(n) __builtin_abs ((n)) #define strcpy(d, s) __builtin_strcpy ((d), (s)) -fcond-mismatch . void . C++ . -ffreestanding (freestanding) . -fno-builtin . "main" . . -fno-hosted . -fgimple "__GIMPLE" . (unit testing) GIMPLE . -fgnu-tm -fgnu-tm ABI (Transactional Memory) ( . ) . GCC . . GCC (-fnon-call-exceptions) . -fgnu89-inline -fgnu89-inline GCC C99 GNU "inline" . "gnu_inline" . -fno-gnu89-inline GCC C99 gnu99 C99 "inline" ( ). -std=c90 -std=gnu90 . "__GNUC_GNU_INLINE__" "__GNUC_STDC_INLINE__" "inline" . -fhosted (hosted) . -fbuiltin . "main" "int" . . -fno-freestanding . -flax-vector-conversions / . . -fms-extensions . C++ . typedef int UOW; struct ABC { UOW UOW; }; (structures) (unions) . x86 ms-abi ..IP -fpermitted-flt-eval-methods=style 4 ISO/IEC TS 18661-3 "FLT_EVAL_METHOD" . C99/C11 "FLT_EVAL_METHOD" . C11 . -fpermitted-flt-eval-methods "FLT_EVAL_METHOD" C99/C11 ISO/IEC TS 18661-3 . style "c11" "ts-18661-3" . (-std=c11 ) -fpermitted-flt-eval-methods=c11 . (-std=gnu11 ) -fpermitted-flt-eval-methods=ts-18661-3 . -fdeps-* . . . -fdeps-file=file . -fdeps-format=format . p1689r5 . ( ++C) -MF makefile . -fdeps-target=file -MT . . -fplan9-extensions Plan 9. -fms-extensions typedef . C ++C. -fsigned-bitfields -funsigned-bitfields -fno-signed-bitfields -fno-unsigned-bitfields (bit-field) "signed" "unsigned" . : "int" . -fsigned-char "char" "signed char" . -fno-unsigned-char -funsigned-char . -fno-signed-char -funsigned-char . -funsigned-char "char" "unsigned char" . "char" "unsigned char" "signed char". (portable) "signed char" "unsigned char" . "char" . . "char" "signed char" "unsigned char" . -fstrict-flex-arrays ( C ++C) -fstrict-flex-arrays=level ( C ++C) (flexible array member) . level . -fstrict-flex-arrays -fstrict-flex-arrays=3 C99 . -fno-strict-flex-arrays -fstrict-flex-arrays=0 . . 0 3 GCC ([0]) ([1]) . level 1 [] [0] [1] . level 2 [] [0] . "strict_flex_array" . -fstrict_flex_arrays -Wstrict-flex-arrays . -fsso-struct=endianness (endianness) . big-endian little-endian native (). ++C . : -fsso-struct GCC ..SS " C++ (Options Controlling C++ Dialect)" C++ . GNU . firstClass.C : g++ -g -fstrict-enums -O -c firstClass.C -fstrict-enums C++ GCC . C -std C++ . C++ : -fabi-version=n n C++ ABI. 0 . 0 C++ ABI . ABI 0 ABI G++ . 1 C++ ABI G++ 3.2 . 2 C++ ABI G++ 3.4 G++ 4.9 . 3 (mangling) . 4 G++ 4.5 . 5 G++ 4.6 const/volatile decltype . 6 G++ 4.7 C++11 const/static_cast ++ -- . 7 G++ 4.8 nullptr_t . 8 G++ 4.9 function-cv-qualifiers . 9 G++ 5.2 "nullptr_t" . 10 G++ 6.1 ia32 ( stdcall) . 11 G++ 7 ...sizeof . . -fnew-inheriting-ctors . 12 G++ 8 x86_64 / . . 13 G++ 8.2 12 . 14 G++ 10 nullptr . 15 G++ 10.3 ABI G++ 10 . 16 G++ 11 "__alignof__" "alignof" . 17 G++ 12 (aggregate) C++14 . 18 G++ 13 . 19 G++ 14 ABI . 20 G++ 15 . : -Wabi. -fabi-compat-version=n (strong aliases) G++ . ABI . -fabi-version=0 ( ) 13 ( GCC 8.2) . ABI 0 . GCC 3.2 4.9 -fabi-compat-version=2 . -Wabi=n . -Wabi ( ) . -fno-access-control . . -faligned-new "new" C++17 "void* ::operator new(std::size_t)" . "-faligned-new=32" ( ) alignof(std::max_align_t) . -std=c++17 . -fno-assume-sane-operators-new C++ "new" "new[]" "delete" "delete[]" C++ . C++ new delete ( "__builtin_operator_new" "__builtin_operator_delete" ). . "-fassume-sane-operators-new-delete" GCC new delete "__builtin_operator_new" "__builtin_operator_delete" ( "errno" "new" "new[]"). "malloc" (hooks) "malloc" . . "-fno-assume-sane-operators-new-delete" GCC ( new delete ) ( GCC ). . -fchar8_t -fno-char8_t "char8_t" C++20 . "char8_t" UTF-8 "__cpp_char8_t" "__cpp_lib_char8_t" . UTF-8 (overload) : int f(const char *); // #1 int f(const char8_t *); // #2 int v1 = f("text"); // Calls #1 int v2 = f(u8"text"); // Calls #2 : int operator""_udl1(char8_t); int v3 = u8'x'_udl1; int operator""_udl2(const char8_t*, std::size_t); int v4 = u8"text"_udl2; template int operator""_udl3(); int v5 = u8"text"_udl3; UTF-8 ISO C++11 . ISO C++11 (well-formed) -fchar8_t (ill-formed) . const char *cp = u8"xx";// error: invalid conversion from // `const char8_t*' to `const char*' int f(const char*); auto v = f(u8"xx"); // error: invalid conversion from // `const char8_t*' to `const char*' std::string s{u8"xx"}; // error: no matching function for call to // `std::basic_string::basic_string()' using namespace std::literals; s = u8"xx"s; // error: conversion from // `basic_string' to non-scalar // type `basic_string' requested "operator new" (non-null) . C++ "operator new" 0 throw() . "operator new" "std::bad_alloc" . new (nothrow) . -fconcepts (Concepts) C++ . -std=c++20 -fconcepts . C++ ISO 19217 (2015) -fconcepts-ts . -fconcepts-ts GCC 14 GCC 15 C++20 . -fconstexpr-depth=n constexpr C++11 n . . . -fconstexpr-cache-depth=n constexpr C++11 (cache) n . (heuristic) ( ) ( ) . . constexpr . -fconstexpr-fp-except F C IEC559 . C++ . F (undefined) . constexpr float inf = 1./0.; // OK with -fconstexpr-fp-except -fconstexpr-loop-limit=n constexpr C++14 n . . (1<<18) . -fconstexpr-ops-limit=n constexpr . constexpr . (1<<25) . -fcontracts C++ (Contracts) C++20 ( N4820) . P1290 P1332 P1429 . C++ . (violation handler) . : void handle_contract_violation (const std::experimental::contract_violation&); N4820 P1332 P1429 . -fcontract-mode=[on|off] (semantics) . on . -fcontract-assumption-mode=[on|off] [N4820] axiom (assume) . on . -fcontract-build-level=[off|default|audit] [N4820] . default . -fcontract-continuation-mode=[on|off] [N4820] . maybe never. off . -fcontract-role=:,, [P1332] . -fcontract-semantic=[default|audit|axiom]: [P1429] . -fcontract-strict-declarations=[on|off] . off . -fcontract-role -fcontract-semantic : "ignore" . "assume" "[[assume]]" C++23 . "check_never_continue" "never" "abort" . . "std::terminate" . "check_maybe_continue" "maybe" . . . -fcoroutines (coroutines) C++ (). -fdiagnostics-all-candidates (front end) C++ (overload resolution) (deleted) . -fno-elide-constructors C++ . G++ (copy constructor) . G++ (trivial) (inline) . C++17 . -fno-enforce-eh-specs . C++ "NDEBUG". (undefined behavior) . -fextern-tls-init -fno-extern-tls-init C++11 OpenMP "thread_local" "threadprivate" ( ) . (wrapper) . (TU) . TU ( TU TU ) -fno-extern-tls-init . (symbol aliases) -fextern-tls-init . -fno-extern-tls-init ..IP -ffold-simple-inlines 4 -fno-fold-simple-inlines C++ "std::move" "std::forward" "std::addressof" "std::as_const" (fold) . (inlining) . -fno-inline . -fno-gnu-keywords "typeof" . "__typeof__" . ISO C++ -ansi -std=c++98 -std=c++11 . -fno-immediate-escalation (immediate function escalation) P2564R3 consteval . : consteval int id(int i) { return i; } constexpr int f(auto t) { return t + id(t); // id causes f to be promoted to consteval } void g(int i) { f (3); } C++20 : "f" ( "auto" "constexpr" ) id(t) "f" "consteval" . id(t) (immediate context) ( consteval ). -fno-immediate-escalation "f" "consteval" consteval id(t) . C++20 . -fimplicit-constexpr (inline) constexpr constexpr . C++14 . . -fno-implicit-templates (non-inline) ( ) . . -fno-implicit-inline-templates . . -fno-implement-inlines (out-of-line) "#pragma implementation" . (linker) . -fmodules -fno-modules C++20 . -fno-modules . C++20 . -fmodule-header -fmodule-header=user -fmodule-header=system (importable header unit). -fmodule-implicit-inline . C++ . (porting) . . ABI . ( .) -fno-module-lazy (lazy module importing) . -fmodule-mapper=[hostname]:port[?ident] -fmodule-mapper=|program[?ident] args... -fmodule-mapper==socket[?ident] -fmodule-mapper=<>[inout][?ident] -fmodule-mapper=out[?ident] -fmodule-mapper=file[?ident] (oracle) . CXX_MODULE_MAPPER . -fmodule-only (Compiled Module Interface) . -fms-extensions Wpedantic MFC int . -fnew-inheriting-ctors P0136 C++11 . C++17 (Defect Report) C++11 C++14 . -fabi-version=10 . -fnew-ttp-matching P0522 : . -std=c++17 . -fno-nonansi-builtins (built- in) ANSI/ISO C . "ffs" "alloca" "_exit" "index" "bzero" "conjf" . -fnothrow-opt throw() "noexcept" . (EH) . "unexpected" "terminate" . -fno-operator-names "and" "bitand" "bitor" "compl" "not" "or" "xor" . -fno-optional-diags . G++ . -fno-pretty-templates (specialization) typedef typename ( "void f(T) [with T = int]" "void f(int)") . . -fno-pretty-templates . -frange-for-ext-temps range-based for C++ . -std=c++23 . . -fno-rtti C++ ("dynamic_cast" "typeid") . . G++ . "dynamic_cast" "void *" . -frtti -fno-rtti . -fno-rtti -frtti . -fsized-deallocation void operator delete (void *, std::size_t) noexcept; void operator delete[] (void *, std::size_t) noexcept; C++14 . . -std=c++14 . -Wsized-deallocation ..IP -fstrict-enums 4 (enumerated type) ( C++ ). (cast) . . -fstrong-eval-order -fstrong-eval-order=kind -- -- C++17 . -fstrong-eval-order -fstrong-eval-order=all -std=c++17 . -fstrong-eval-order=some C++ C++17 . -fstrong-eval-order=none -fno-strong-eval-order . -ftemplate-backtrace-limit=n (template instantiation notes) n . . -ftemplate-depth=n n . . ANSI/ISO C++ ( C++11 ). (stack) . -fno-threadsafe-statics C++ ABI (thread-safe) . . -fuse-cxa-atexit (destructors) "atexit" "__cxa_atexit" . C "__cxa_atexit" . -fno-use-cxa-get-exception-ptr "__cxa_get_exception_ptr" . "std::uncaught_exception" . -fvisibility-inlines-hidden inline (shared objects) . GCC inline "__attribute__ ((visibility ("hidden")))" DSO DSO PLT . (link) DSO . hidden . (visibility) . inline default . . (explicitly instantiated) (linkage) . -fvisibility-ms-compat C++ GCC Microsoft Visual Studio . GCC : 1. -fvisibility=hidden "hidden" . 2. ( ) . 3. (ODR) : . -fvisibility=hidden . Visual Studio . . ODR . -fno-weak (weak symbols) . G++ . . G++ . -fext-numeric-literals ( C++ Objective-C++) GNU . C++11 . C++11 GNU : -std=c++98 -std=gnu++98 -std=gnu++11 -std=gnu++14. ISO C++11 (-std=c++11 ...) . -nostdinc++ C++ . ( C++ .) -flang-info-include-translate -flang-info-include-translate-not -flang-info-include-translate=header include . include include . header include . header "user" "" include (resolve) . -flang-info-module-cmi -flang-info-module-cmi=module (CMI) . CMI . module CMI . module (header-unit) ( "<>" "" ). -stdlib=libstdc++,libc++ G++ C++ . : libstdc++ ( C++ G++) libc++ C++ ( Darwin Darwin11 ). G++ C++ "-lstdc++" "-lc++" . C++ : -Wabi-tag ( C++ Objective-C++) ABI ABI . ABI C++ Attributes . -Wcomma-subscript ( C++ Objective-C++) . C++20 (deprecated) C++23 . "( )" . : void f(int *a, int b, int c) { a[b,c]; // deprecated in C++20, invalid in C++23 a[(b,c)]; // OK } C++23 . G++ C++23 C++20 (pedantic) -Wno-comma-subscript . -std=c++20 -Wno-deprecated -std=c++23 -Wno-deprecated . -std=c++20 -Wdeprecated . C++23 -pedantic-errors ..IP "-Wctad-maybe-unsupported ( C++ Objective-C++)" 4 (CTAD) (deduction guide) . CTAD . CTAD << >> (opt-in) CTAD . : struct allow_ctad_t; // any name works template struct S { S(T) { } }; // Guide with incomplete parameter type will never be considered. S(allow_ctad_t) -> S; -Wctor-dtor-privacy ( C++ Objective-C++) (private) (friend) (public static) . . -Wdangling-reference ( C++ Objective-C++) (reference) . : int n = 1; const int& r = std::max(n - 1, n + 1); // r is dangling . (full-expression) "r" (dangling) . : const int& f(const int& i) { return i; } struct S { const int &r; // r is dangling S() : r(f(10)) { } }; : struct S { const S& self () { return *this; } }; const S& s = S().self(); // s is dangling "std::use_facet": . "#pragma" : #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdangling-reference" const T& foo (const T&) { ... } #pragma GCC diagnostic pop "#pragma" . -Wdangling-reference auto p = std::minmax(1, 2); "std::minmax" "std::pair" "std::minmax" . "std::span" . : template struct Span { T* data_; std::size len_; }; "std::span" -union (trivial) . "gnu::no_dangling" . -Wextra . -Wdelete-non-virtual-dtor ( C++ Objective-C++) "delete" . . -Wall . -Wdeprecated-copy ( C++ Objective-C++) C++11 (copy constructor) (copy assignment operator) . -Wextra . -Wdeprecated-copy-dtor . -Wno-deprecated-enum-enum-conversion ( C++ Objective-C++) (usual arithmetic conversions) . C++20 . : enum E1 { e }; enum E2 { f }; int k = f - e; -Wdeprecated-enum-enum-conversion -std=c++20 . C++20 -Wenum-conversion -Wdeprecated . -Wno-deprecated-enum-float-conversion ( C++ Objective-C++) (floating-point) . C++20 . : enum E1 { e }; enum E2 { f }; bool b = e <= 3.7; -Wdeprecated-enum-float-conversion -std=c++20 . C++20 -Wenum-conversion -Wdeprecated . -Wdeprecated-literal-operator ( C++ Objective-C++) (user-defined literal operator) . C++23 -Wdeprecated . string operator "" _i18n(const char*, std::size_t); // deprecated string operator ""_i18n(const char*, std::size_t); // preferred -Wdeprecated-variadic-comma-omission ( C++ Objective-C++) "..." (varargs) . C++26 -Wdeprecated . void f1(int...); // deprecated void f1(int, ...); // preferred template void f2(T...); // ok template void f3(T......); // deprecated -Wno-elaborated-enum-base C++11 enum-base () elaborated-type-specifier . enum enum . . -pedantic-errors . -Wno-init-list-lifetime ( C++ Objective-C++) "std::initializer_list" (dangling pointers) . "initializer_list" C++ . : * "initializer_list" "initializer_list" return . * new "initializer_list" "initializer_list" heap . * "initializer_list" "initializer_list" . // li's initial underlying array lives as long as li std::initializer_list li = { 1,2,3 }; // assignment changes li to point to a temporary array li = { 4, 5 }; // now the temporary is gone and li has a dangling pointer int i = li.begin()[0] // undefined behavior (list constructor) "begin" "initializer_list" "initializer_list" (dangling) . -Winvalid-constexpr (constant expression) . C++20 "constexpr" (instantiation) (core constant expression) . C++23 "constexpr" . C++20 pedantic . C++23 -Winvalid-constexpr . : void f (int& i); constexpr void g (int& i) { // Warns by default in C++20, in C++23 only with -Winvalid-constexpr. f(i); } -Winvalid-imported-macros (imported) . . header-unit . -Wno-literal-suffix ( C++ Objective-C++) ud-suffix (underscore) . GCC "" . : #define __STDC_FORMAT_MACROS #include #include int main() { int64_t i64 = 123; printf("My int64: %" PRId64"\n", i64); } "PRId64" . . . . -Wno-narrowing ( C++ Objective-C++) C++11 (narrowing conversions) . -Wno-narrowing . (well-formed) SFINAE (ill-formed) . -Wnarrowing C++98 C++11 { } : int i = { 2.2 }; // error: narrowing from double to int -Wall -Wc++11-compat . -Wnoexcept ( C++ Objective-C++) noexcept-expression ( throw() "noexcept") false . -Wnoexcept-type ( C++ Objective-C++) C++17 "noexcept" (mangled name) C++14 . -Wabi -Wc++17-compat . : template void f(T t) { t(); }; void g() noexcept; void h() { f(g); } C++14 "f" "f" C++17 "f" . -Wclass-memaccess ( C++ Objective-C++) "memset" "memcpy" (non-trivial) (copy assignment) const ( const-correctness) (vtable) . (representation) (invariants) . "memset" (undefined) . . std::string str = "abc"; memset (&str, 0, sizeof str); -Wclass-memaccess -Wall . (cast) "void *" . -Wnon-virtual-dtor ( C++ Objective-C++) (polymorphic) . -Weffc++ . -Wdelete-non-virtual-dtor ( -Wall) (false positives) . -Wregister ( C++ Objective-C++) "register" GNU Explicit Register Variables . "register" C++11 C++17 . -std=c++17 . -Wreorder ( C++ Objective-C++) (member initializers) . : struct A { int i; int j; A(): j (0), i (1) { } }; "i" "j" . -Wall . -Wno-pessimizing-move ( C++ Objective-C++) "std::move" (copy elision) . copy elision (automatic) volatile . struct T { ... }; T fn() { T t; ... return std::move (t); } "std::move" copy elision . -Wall . -Wno-redundant-move ( C++ Objective-C++) "std::move" "std::move" . copy elision rvalue . : struct T { ... }; T fn(T t) { ... return std::move (t); } "std::move" . G++ Core Issue 1579 : struct T { // convertible to U ... }; struct U { ... }; U fn() { T t; ... return std::move (t); } copy elision G++ rvalue . -Wextra ..IP "-Wrange-loop-construct ( C++ Objective-C++)" 4 for (range-based for-loop) ++C . . : struct S { char arr[128]; }; void fn () { S arr[5]; for (const auto x : arr) { ... } } (trivially-copyable) . for . : void fn() { int arr[10]; for (const double &x : arr) { ... } } "double" "const double &" . -Wall . -Wredundant-tags ( C++ Objective-C++) class-key enum-key . : struct foo; struct foo *p; // warn that keyword struct can be eliminated : struct foo; void foo (); // "hides" struct foo void bar (struct foo&); // no warning, keyword struct is necessary -Wno-subobject-linkage ( C++ Objective-C++) (anonymous namespace) (linkage) . A B (internal linkage) ODR B . A . .C . -Wsubobject-linkage . -Weffc++ ( C++ Objective-C++) Effective C++ Scott Meyers : * (copy constructor) (assignment operator) . * (initialization) (assignment) . * "operator=" *this . * . * . * "&&" "||" "," (overload) . -Wnon-virtual-dtor Effective C++ . (non-polymorphic) . grep -v . -Wno-exceptions ( C++ Objective-C++) (exception handler) (shadow) . -Wstrict-null-sentinel ( C++ Objective-C++) "NULL" (sentinel) . GCC "NULL" "__null" . . (portable) . -Wno-non-template-friend ( C++ Objective-C++) . GCC ISO friend int foo(int) unqualified-id (specialization) . -Wold-style-cast ( C++ Objective-C++) ( C) void ++C . ("dynamic_cast" "static_cast" "reinterpret_cast" "const_cast") . -Woverloaded-virtual ( C++ Objective-C++) -Woverloaded-virtual=n . : struct A { virtual void f(); }; struct B: public A { void f(int); // does not override }; "A" "f" "B" : B* b; b->f(); . using "using A::f;" "B". (override) : struct C { virtual void f(); virtual void f(int); }; struct D: public C { void f(int); // does override } D . . -Woverloaded-virtual . -Wall . -Wno-pmf-conversions ( C++ Objective-C++) . -Wsign-promo ( C++ Objective-C++) (overload resolution) . G++ . -Wtemplates ( C++ Objective-C++) (primary template) . . STL STL . (instantiate) (specialize) . -Wmismatched-new-delete ( C++ Objective-C++) "operator new" "operator delete" . "operator delete" ++C "operator new" "operator delete" "operator new" . "delete" "new" . "free" . void f () { int *a = new int[n]; delete a; // warning: mismatch in array forms of expressions char *p = new char[n]; free (p); // warning: mismatch between new and free } -Wmismatched-dealloc "operator new" "operator delete" . -Wmismatched-new-delete -Wall ..IP "-Wmismatched-tags ( C++ Objective-C++)" 4 struct class (class templates) (specializations) class-key ( ) . "struct Object" "draw" . class-key "struct" "class" . class Object { public: virtual ~Object () = 0; }; void draw (struct Object*); class-key "struct" . -Wmismatched-tags . Windows (unresolved references) (symbol mangling) class-key . -Wredundant-tags . -Wmultiple-inheritance ( C++ Objective-C++) . . STL STL . . -Wvirtual-inheritance . . STL STL . . -Wno-virtual-move-assign (move assignment) (non-trivial) C++11 . (move) (moved-from) . . -Wnamespaces . . STL STL . using (qualified names) . -Wno-template-body ( C++ Objective-C++) (template) (instantiation) . Wno-error= -fpermissive . -Wno-template-id-cdtor ( C++ Objective-C++) simple-template-id declarator-id C++20 DR 2237 . : template struct S { S(); // should be S(); ~S(); // should be ~S(); }; -Wtemplate-id-cdtor -std=c++20 -Wc++20-compat . -Wtemplate-names-tu-local (translation-unit-local) . ( / internal linkage) CMI . (non-inline) . (import) . . (explicit instantiation) . -Wextra . -Wno-terminate ( C++ Objective-C++) throw "terminate" . -Wno-vexing-parse ( C++ Objective-C++) << >> (most vexing parse) . C++ . : void f(double a) { int i(); // extern int i (void); int n(int(a)); // extern int n (int); } : struct S { S(int); }; void f(double a) { S x(int(a)); // extern struct S x (int); S y(int()); // extern struct S y (int (*) (void)); S z(); // extern struct S z (void); } . . -Wno-class-conversion ( C++ Objective-C++) (conversion function) void . -Wvolatile ( C++ Objective-C++) "volatile" . "++" "--" "volatile" "volatile" "volatile" "volatile" "volatile" (structured bindings) "volatile" . C++20 . -std=c++20 . -std=c++20 -Wdeprecated . -Waligned-new new (alignment) alignof(std::max_align_t) . -Wall . -Waligned-new=all . -Wno-placement-new -Wplacement-new=n placement new (undefined behavior) . placement new . char buf [64]; new (buf) int[64]; . -Wplacement-new=1 -Wplacement-new . GCC . "new" C++ . struct S { int n, a[1]; }; S *s = (S *)malloc (sizeof *s + 31 * sizeof s->a[0]); new (s->a)int [32](); -Wplacement-new=2 placement new . (flexible member array) . struct S { int n, a[]; }; S *s = (S *)malloc (sizeof *s + 32 * sizeof s->a[0]); new (s->a)int [32](); -Wcatch-value=n ( C++ Objective-C++) catch (reference) . -Wcatch-value=1 ( -Wcatch-value) (polymorphic) (by value) . -Wcatch-value=2 . -Wcatch-value=3 . -Wcatch-value -Wall . -Wconditionally-supported ( C++ Objective-C++) (conditionally-supported C++11 [intro.defs]) . -Wno-defaulted-function-deleted ( C++ Objective-C++) (defaulted) (delete) . . . -Wno-delete-incomplete ( C++ Objective-C++) (delete) (incomplete type) . . -Wextra-semi ( C++ Objective-C++) . . (in-class) C++ ( pedwarn ): struct S { void foo () {}; }; (namespace scope) C++11 ( C++98 pedwarn ): struct S { }; ; C++11 ( C++98 pedwarn ): struct S { int a; ; }; -Wno-global-module ( C++ Objective-C++) (global module fragment) . -Wno-inaccessible-base ( C++ Objective-C++) . . -Wextra . struct A { int a; }; struct B : A { }; struct C : B, A { }; -Wno-inherited-variadic-ctor C++11 (variadic) C (ellipsis) . -Wno-invalid-offsetof ( C++ Objective-C++) "offsetof" -POD . ISO C++ "offsetof" (non-standard-layout) . C++ "offsetof" . . "offsetof" C++ . -Wsized-deallocation ( C++ Objective-C++) (unsized deallocation) void operator delete (void *) noexcept; void operator delete[] (void *) noexcept; (sized deallocation) void operator delete (void *, std::size_t) noexcept; void operator delete[] (void *, std::size_t) noexcept; . -Wextra -fsized-deallocation . -Wsuggest-final-types "final" C++11 (anonymous namespace) . GCC (devirtualize) . (link-time optimization) . -Wsuggest-final-methods "final" C++11 "final" . . -Wsuggest-final-types . -Wsuggest-override (overriding) "override" . -Wno-conversion-null ( C++ Objective-C++) "NULL" . -Wconversion-null ..SS " Objective-C Objective-C++ (Options Controlling Objective-C and Objective-C++ Dialects)" (: Objective-C Objective-C++ . Objective-C Objective-C++ . GNU . some_class.m : gcc -g -fgnu-runtime -O -c some_class.m -fgnu-runtime Objective-C Objective-C++ GCC . Objective-C C Objective-C C ( -Wtraditional) . Objective-C++ C++ ( -Wabi) . Objective-C Objective-C++ : -fconstant-string-class=class-name class-name "@"..."" . GNU "NXConstantString" NeXT "NSConstantString" ( ). Darwin / macOS -fconstant-cfstrings -fconstant-string-class "@"..."" CoreFoundation . -fconstant-cfstrings -mconstant-cfstrings . -fgnu-runtime GNU Objective-C. . -fnext-runtime NeXT. NeXT Darwin / macOS . "__NEXT_RUNTIME__" . -fno-nil-receivers Objective-C ("[receiver message:arg]") "nil" . . NeXT 0 1 ABI . -fobjc-abi-version=n n ABI Objective-C . NeXT . 0 ABI ( ) Objective-C 2.0 . 1 ABI ( ) Objective-C 2.0 . 2 ABI ( ) . 0 2 . -fobjc-call-cxx-cdtors Objective-C C++ . "- (id) .cxx_construct" "self" . C++ "- (void) .cxx_destruct" . "- (id) .cxx_construct" "- (void) .cxx_destruct" Objective-C . Objective-C . "- (id) .cxx_construct" "- (void) .cxx_destruct" . NeXT Mac OS X 10.4 "- (id) .cxx_construct" "- (void) .cxx_destruct" . -fobjc-direct-dispatch . Darwin comm page . -fobjc-exceptions Objective-C C++ . @try @throw @catch @finally @synchronized Objective-C . GNU NeXT ( NeXT Mac OS X 10.2 ). -fobjc-gc (GC) Objective-C Objective-C++. NeXT GNU . -fobjc-nilcheck NeXT 2 ABI nil . -fno-objc-nilcheck . super nil . GNU ABI NeXT . -fobjc-std=objc1 Objective-C 1.0 GCC 4.0 . Objective-C C/C++ C/C++ C/C++ . Objective-C Objective-C++ Objective-C GCC 4.0 . Objective-C GCC . -freplace-objc-classes ld(1) dyld(1) . Fix-and-Continue . Fix-and-Continue NeXT Mac OS X 10.3 . -fzero-link NeXT objc_getClass("...") ( ) . -fzero-link objc_getClass("...") . Zero-Link . GNU objc_get_class("...") . -fno-local-ivars Objective-C . (shadowing) . -fno-local-ivars . -fivar-visibility=[public|protected|private|package] . -gen-decls (interface) sourcename.decl . -Wassign-intercept ( Objective-C Objective-C++) Objective-C . -Wno-property-assign-default ( Objective-C Objective-C++) Objective-C . -Wno-protocol ( Objective-C Objective-C++) . . -Wno-protocol . -Wobjc-root-class ( Objective-C Objective-C++) . "NSObject" ( "Object") . "__attribute__((objc_root_class))" . -Wselector ( Objective-C Objective-C++) . . @selector(...) . -- -fsyntax-only -- . -Wstrict-selector-match ( Objective-C Objective-C++) "id" "Class" / . ( ) ..IP "-Wundeclared-selector ( Objective-C Objective-C++)" 4 @selector(...) . @selector(...) @interface @protocol @implementation . @selector(...) -Wselector . . -print-objc-runtime-info C (by value) . OpenMP OpenACC GCC OpenMP C C++ Fortran -fopenmp . OpenACC -fopenacc . -foffload=disable -foffload=default -foffload=target-list (offload) OpenMP OpenACC . -foffload=default . -foffload=disable (host fallback) -foffload=target-list . target-triplet GCC . -v "OFFLOAD_TARGET_NAMES" . -foffload-options=options -foffload-options=target-triplet-list=options -foffload-options=options GCC options . -foffload-options=target-list=options . target-list -foffload= . : -foffload-options='-fno-math-errno -ffinite-math-only' \ -foffload-options=nvptx-none=-latomic -foffload-options=amdgcn-amdhsa=-march=gfx906 -fopenacc OpenACC #pragma acc C/C++ !$acc (free-form) !$acc c$acc *$acc (fixed-form) . -pthread -pthread . -fopenacc-dim=geom . geom : gang worker vector. . -fopenmp OpenMP #pragma omp [[omp::directive(...)]] [[omp::decl(...)]] [[omp::sequence(...)]] C/C++ . !$omp !$ . c * . -pthread -pthread . -fopenmp -fopenmp-simd . -fopenmp-simd "simd" "declare simd" "declare reduction" "assume" "ordered" "scan" "loop" OpenMP "simd" "#pragma omp" "[[omp::directive(...)]]" "[[omp::sequence(...)]]" "[[omp::decl(...)]]" C/C++ "!$omp" . !$ . c * . OpenMP . -fopenmp "loop" "bind" (task) . -fopenmp-target-simd-clone -fopenmp-target-simd-clone=device-type (clones) SIMD "declare simd" GCC "declare target" OpenMP . device-type "none" "host" "nohost" "any" "device_type" "declare target" . -fopenmp-target-simd-clone -fopenmp-target-simd-clone=any -fno-openmp-target-simd-clone -fopenmp-target-simd-clone=none . -O2 ( -Os -Og) -fopenmp-target-simd-clone=nohost . ( ) . . (front ends) . -fmessage-length=n n . n (line-wrapping) . . - #error #warning (attribute) (deprecated) // . pragma GCC warning pragma GCC error . -fdiagnostics-plain-output dejagnu . -fdiagnostics-plain-output : -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -fdiagnostics-urls=never -fdiagnostics-path-format=separate-events -fdiagnostics-text-art-charset=none -fno-diagnostics-show-event-links GCC . -fdiagnostics-show-location=once . ( ) . . -fdiagnostics-show-location=every-line . ( ) . -fdiagnostics-color[=WHEN] -fno-diagnostics-color . WHEN never always auto . WHEN GCC_COLORS never auto . auto GCC (standard error) emacs . -fdiagnostics-color -fno-diagnostics-color -fdiagnostics-color=always -fdiagnostics-color=never . GCC_COLORS . Select Graphic Rendition (SGR) . SGR . ( .) (semicolon) . : 1 (bold) 4 (underline) 5 (blink) 7 (inverse) 39 30 37 90 97 38;5;0 38;5;255 49 40 47 100 107 48;5;0 48;5;255 . GCC_COLORS : error=01;31:warning=01;35:note=01;36:range1=32:range2=34:locus=01:\ quote=01:path=01;36:fixit-insert=32:fixit-delete=31:\ diff-filename=01:diff-hunk=32:diff-delete=31:diff-insert=32:\ type-diff=01;32:fnname=01;32:targs=35:valid=01;31:invalid=01;32\ highlight-a=01;32:highlight-b=01;34 01;31 01;35 01;36 32 34 01 31 . GCC_COLORS . : "error=" SGR :error. "warning=" SGR :warning. "note=" SGR :note. "path=" SGR (control-flow) -fdiagnostics-path-format= . "range1=" SGR . "range2=" SGR . "locus=" SGR file:line file:line:column . "quote=" SGR . "fnname=" SGR C++. "targs=" SGR C++. "fixit-insert=" SGR (fix-it hints) . "fixit-delete=" SGR . "diff-filename=" SGR (patches) . "diff-hunk=" SGR (hunks) . "diff-delete=" SGR . "diff-insert=" SGR . "type-diff=" SGR C++. "valid=" SGR (text art). "invalid=" SGR . "highlight-a=" "highlight-b=" SGR . : -fdiagnostics-show-highlight-colors. (escape sequences) URL . -fdiagnostics-show-option URL . WHEN never always auto . auto GCC URL (standard error) emacs . . WHEN . GCC ( --with-diagnostics-urls=auto-if-env) . GCC_URLS TERM_URLS GCC auto never . -fdiagnostics-urls=always : GCC_URLS no URL . st URL ST . bel () URL BEL . . GCC_URLS TERM_URLS . : ST ANSI ESC \ BEL ASCII CTRL-G . GCC URL ( URL ) . xfce4-terminal gnome-terminal (linux console) mingw . -fdiagnostics-urls=always . -fno-diagnostics-show-option ( ). -fno-diagnostics-show-option . -fno-diagnostics-show-caret ^ . . -fmessage-length=n n . COLUMNS . -fno-diagnostics-show-labels ( -fdiagnostics-show-caret) : printf ("foo %s bar", long_i + long_j); ~^ ~~~~~~~~~~~~~~~ | | char * long int ( "char *" "long int"). -fno-diagnostics-show-event-links ( -fdiagnostics-path-format=inline-events) GCC : 3 | if (p) | ^ | | | (1) following `false' branch (when `p' is NULL)... ->-+ | | | | |+------------------------------------------------------------+ 4 || return 0; 5 || return *p; || ~ || | |+-------->(2) ...to here | (3) dereference of NULL `p' . -fno-diagnostics-show-cwe CWE ("https://cwe.mitre.org/index.html") . GCC -fanalyzer . GCC . . . -fno-diagnostics-show-rules (specification). GCC . . . -fno-diagnostics-show-highlight-colors GCC . : demo.c: In function `test_bad_format_string_args': ../../src/demo.c:25:18: warning: format `%i' expects argument of type `int', but argument 2 has type `const char *' [-Wformat=] 25 | printf("hello %i", msg); | ~^ ~~~ | | | | int const char * | %s * %i "int" "int" "highlight-a" ( ) * "const char *" "highlight-b" ( ) . . ( -fdiagnostics-color=) -fno-diagnostics-show-highlight-colors . -fno-diagnostics-show-line-numbers ( -fdiagnostics-show-caret) . . -fdiagnostics-minimum-margin-width=width -fdiagnostics-show-line-numbers . 6 . -fdiagnostics-parseable-fixits (fix-it hints) IDE . "fix-it:" . : fix-it:"test.c":{45:3-45:21}:"gtk_widget_show_all" . "test.c" : 00000000011111111112222222222 12345678901234567890123456789 gtk_widget_showall (dlg); ^^^^^^^^^^^^^^^^^^ gtk_widget_show_all "\\" "\t" "\n" "\"" ( "\013") . . ( "45:3-45:3") . -fdiagnostics-generate-patch unified diff stderr . : --- test.c +++ test.c @ -42,5 +42,5 @ void show_cb(GtkDialog *dlg) { - gtk_widget_showall(dlg); + gtk_widget_show_all(dlg); } diff ( -fdiagnostics-color )..IP -fdiagnostics-show-template-tree 4 C++ (template types) : could not convert 'std::map >()' from 'map<[...],vector>' to 'map<[...],vector> -fdiagnostics-show-template-tree : map< [...], vector< [double != float]>> ( <> <>). -fno-elide-type C++ <<[...]>> . : could not convert 'std::map >()' from 'map<[...],vector>' to 'map<[...],vector> -fno-elide-type . -fdiagnostics-show-template-tree . -fdiagnostics-path-format=KIND (control-flow) . KIND none separate-events inline-events () . none . separate-events <> . : test.c:29:5: error: passing NULL as argument 1 to 'PyList_Append' which requires a non-NULL parameter test.c:25:10: note: (1) when 'PyList_New' fails, returning NULL test.c:27:3: note: (2) when 'i < count' test.c:29:5: note: (3) when calling 'PyList_Append', passing NULL from (1) as argument 1 inline-events <<>> (inline) . . : 'test': events 1-3 25 | list = PyList_New(0); | ^~~~~~~~~~~~~ | | | (1) when 'PyList_New' fails, returning NULL 26 | 27 | for (i = 0; i < count; i++) { | ~~~ | | | (2) when 'i < count' 28 | item = PyLong_FromLong(random()); 29 | PyList_Append(list, item); | ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | (3) when calling 'PyList_Append', passing NULL from (1) as argument 1 (Interprocedural) (stack frame) (push) (pop) . : 'test': events 1-2 | | 133 | { | | ^ | | | | | (1) entering 'test' | 134 | boxed_int *obj = make_boxed_int (i); | | ~~~~~~~~~~~~~~~~~~ | | | | | (2) calling 'make_boxed_int' | +--> 'make_boxed_int': events 3-4 | | 120 | { | | ^ | | | | | (3) entering 'make_boxed_int' | 121 | boxed_int *result = (boxed_int *)wrapped_malloc (sizeof (boxed_int)); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (4) calling 'wrapped_malloc' | +--> 'wrapped_malloc': events 5-6 | | 7 | { | | ^ | | | | | (5) entering 'wrapped_malloc' | 8 | return malloc (size); | | ~~~~~~~~~~~~~ | | | | | (6) calling 'malloc' | <-------------+ | 'test': event 7 | | 138 | free_boxed_int (obj); | | ^~~~~~~~~~~~~~~~~~~~ | | | | | (7) calling 'free_boxed_int' | (etc) -fdiagnostics-show-path-depths . -fdiagnostics-path-format=inline-events . -fdiagnostics-path-format=separate-events (function declaration) . GCC . -fno-show-column . () dejagnu. -fdiagnostics-column-unit=UNIT . ( -fno-show-column) JSON . UNIT display . tab . <> UTF-8 <> UTF-8 . UNIT byte GCC 11.1.0 . -fdiagnostics-column-origin=ORIGIN . 1 GCC GNU . 0 . -fdiagnostics-escape-format=FORMAT GCC . UTF-8 (Unicode normalization) . GCC (ASCII) (escape) . . FORMAT unicode UTF-8 . before U+03C0 (<> UTF-8 0xCF 0x80) 0xBF ( UTF-8) after : beforeafter FORMAT bytes . : before<80>after << >> (text art) : (monospaced) . . CHARSET none ascii unicode emoji . none . ascii (<< >>) . unicode ( ) . emoji ( U+26A0 WARNING SIGN U+FE0F VARIATION SELECTOR-16 ). emoji LANG C ascii . -fdiagnostics-format=FORMAT . FORMAT text sarif-stderr sarif-file json json-stderr json-file . << >> -fdiagnostics-add-output= -fdiagnostics-set-output= . text . sarif-stderr sarif-file SARIF 2.1.0 stderr source.sarif . json json-stderr json-file JSON . json json-stderr . json-stderr json-file JSON. json-stderr JSON stderr json-file source.gcc.json . -fdiagnostics-add-output=DIAGNOSTICS-OUTPUT-SPEC << >> . DIAGNOSTICS-OUTPUT-SPEC ":" KEY=VALUE : := :=,= . <> . SCHEME : text stderr GCC. : color=[yes|no] -fdiagnostics-color . experimental-nesting=[yes|no] . experimental-nesting-show-locations=[yes|no] "experimental-nesting=yes" "no" . GCC DejaGnu . experimental-nesting-show-levels=[yes|no] "experimental-nesting=yes" . "yes" . GCC . sarif SARIF. : file=FILENAME SARIF . source.sarif . version=[2.1|2.2-prerelease] SARIF . 2.1 . "2.2-prerelease" SARIF 2.2 . -fdiagnostics-add-output=sarif:version=2.1,file=foo.2.1.sarif -fdiagnostics-add-output=sarif:version=2.2-prerelease,file=foo.2.2.sarif 2.1 2.2 SARIF . EBNF: = | , ":", ; = "text" | "sarif"; = | "," ; = "=" ; = ? string without a '=' ? ; = ? string without a ',' ? ; -fdiagnostics-set-output=DIAGNOSTICS-OUTPUT-SPEC -fdiagnostics-add-output= << >> -fdiagnostics-format= -fdiagnostics-add-output= -fdiagnostics-set-output= . -fno-diagnostics-json-formatting JSON ( -fdiagnostics-format=sarif-stderr -fdiagnostics-format=sarif-file -fdiagnostics-format=json -fdiagnostics-format=json-stderr -fdiagnostics-format=json-file) GCC JSON . -fno-diagnostics-json-formatting . . GCC..SS " (Options to Request or Suppress Warnings)" . GCC . -fsyntax-only . -fmax-errors=n n GCC . n 0 () . -Wfatal-errors -Wfatal-errors . -w . -Werror . -Werror= . -Werror=switch -Wswitch . -Werror -Wno-error=switch -Wswitch -Werror . . -Werror= -Wno-error= . ( -fno-diagnostics-show-option .) -Werror=foo -Wfoo . -Wno-error=foo . -Wfatal-errors . -W -Wunused-variable . -Wno- -Wno-unused-variable. ( ) . C++ Dialect Options Objective-C and Objective-C++ Dialect Options . -Wall -Wextra -Wunused -Wunused-variable . . . pragma . ( -Wunknown-warning) GCC . -Wno- : -Wno-unknown-warning . -Wno- . . -Wsuggest-final-types (link-time optimization) . . (false positives) . -Wpedantic -pedantic ISO C ISO C++ ISO C ISO C++ . ISO C C++ -std . ISO C ISO C++ ( -ansi -std ). C C++ . ( -pedantic-errors ). -Wpedantic __ . ISO __intN ( __intN__) . "__extension__" . . -Wpedantic -Wpedantic -Wpedantic -Wno-pointer-sign. -std C ( gnu90 gnu99) (base standard) ISO C . -Wpedantic . ( C C .) -pedantic-errors ( -Wpedantic) . -Werror=pedantic : -Wpedantic -Wpedantic . -Wpedantic -pedantic-errors -Wno-pedantic ( -pedantic-errors -Wno-error=pedantic ). -fpermissive -Wno-error=narrowing . ISO -Wpedantic -pedantic-errors . : -Wattributes ( ) -Wchanges-meaning (C++) -Wcomma-subscript (C++23 ) -Wdeclaration-after-statement (C90 ) -Welaborated-enum-base (C++11 ) -Wimplicit-int (C99 ) -Wimplicit-function-declaration (C99 ) -Wincompatible-pointer-types -Wint-conversion -Wlong-long (C90 ) -Wmain -Wnarrowing (C++11 ) -Wpointer-arith -Wpointer-sign -Wincompatible-pointer-types -Wregister (C++17 ) -Wvla (C90 ) -Wwrite-strings (C++11 ) -fpermissive . -fpermissive . C++ C C++ : -Wdeclaration-missing-parameter-type ( C Objective-C) -Wimplicit-function-declaration ( C Objective-C) -Wimplicit-int ( C Objective-C) -Wincompatible-pointer-types ( C Objective-C) -Wint-conversion ( C Objective-C) -Wnarrowing ( C++ Objective-C++) -Wreturn-mismatch ( C Objective-C) -Wtemplate-body ( C++ Objective-C++) -fpermissive C (-std=c89 -std=gnu89 -std=c90 -std=gnu90). -Wall ( ) . C++ Dialect Options Objective-C and Objective-C++ Dialect Options . -Wall : -Waddress -Waligned-new ( C++ Objective-C++) -Warray-bounds=1 ( -O2) -Warray-compare -Warray-parameter=2 -Wbool-compare -Wbool-operation -Wc++11-compat -Wc++14-compat -Wc++17compat -Wc++20compat -Wcatch-value ( C++ Objective-C++) -Wchar-subscripts -Wclass-memaccess ( C++ Objective-C++) -Wcomment -Wdangling-else -Wdangling-pointer=2 -Wdelete-non-virtual-dtor ( C++ Objective-C++) -Wduplicate-decl-specifier ( C Objective-C) -Wenum-compare ( C/ObjC C++ ) -Wenum-int-mismatch ( C Objective-C) -Wformat=1 -Wformat-contains-nul -Wformat-diag -Wformat-extra-args -Wformat-overflow=1 -Wformat-truncation=1 -Wformat-zero-length -Wframe-address -Wimplicit ( C Objective-C) -Wimplicit-function-declaration ( C Objective-C) -Wimplicit-int ( C Objective-C) -Winfinite-recursion -Winit-self ( C++ Objective-C++) -Wint-in-bool-context -Wlogical-not-parentheses -Wmain ( C/ObjC -ffreestanding) -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation ( C/C++) -Wmismatched-dealloc -Wmismatched-new-delete ( C++ Objective-C++) -Wmissing-attributes -Wmissing-braces ( C/ObjC) -Wmultistatement-macros -Wnarrowing ( C++ Objective-C++) -Wnonnull -Wnonnull-compare -Wopenmp-simd ( C C++) -Woverloaded-virtual=1 ( C++ Objective-C++) -Wpacked-not-aligned -Wparentheses -Wpessimizing-move ( C++ Objective-C++) -Wpointer-sign ( C/ObjC) -Wrange-loop-construct ( C++ Objective-C++) -Wreorder ( C++ Objective-C++) -Wrestrict -Wreturn-type -Wself-move ( C++ Objective-C++) -Wsequence-point -Wsign-compare ( C++ Objective-C++) -Wsizeof-array-div -Wsizeof-pointer-div -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-overflow=1 -Wswitch -Wtautological-compare -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-but-set-variable -Wunused-const-variable=1 ( C/ObjC) -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-value -Wunused-variable -Wuse-after-free=2 -Wvla-parameter -Wvolatile-register-var -Wzero-length-bounds -Wall . . -Wextra ..IP -Wextra 4 -Wall . ( -W . .) -Wabsolute-value ( C/ObjC) -Walloc-size -Wcalloc-transposed-args -Wcast-function-type -Wclobbered -Wdangling-reference ( C++) -Wdeprecated-copy ( C++ Objective-C++) -Wempty-body -Wenum-conversion ( C/ObjC) -Wexpansion-to-defined -Wignored-qualifiers ( C/C++) -Wimplicit-fallthrough=3 -Wmaybe-uninitialized -Wmissing-field-initializers -Wmissing-parameter-name ( C/ObjC) -Wmissing-parameter-type ( C/ObjC) -Wold-style-declaration ( C/ObjC) -Woverride-init ( C/ObjC) -Wredundant-move ( C++ Objective-C++) -Wshift-negative-value ( C++11 C++17 C99 ) -Wsign-compare ( C++ Objective-C++) -Wsized-deallocation ( C++ Objective-C++) -Wstring-compare -Wtype-limits -Wuninitialized -Wunterminated-string-initialization -Wunused-parameter ( -Wunused -Wall) -Wunused-but-set-parameter ( -Wunused -Wall) -Wextra : * "<" "<=" ">" ">=" . * ( C++) (enumerator) . * ( C++) (Ambiguous virtual bases). * ( C++) "register" . * ( C++) "register" . * ( C++) (copy constructor) . -Wabi ( C Objective-C C++ Objective-C++) ABI . ABI C++ psABI . -Wpsabi -Wabi . G++ ABI -Wabi C++ ABI ABI . ABI ( -fabi-version=n) -Wabi . -Wabi C++ ABI -fabi-version -Wabi=2 -fabi-version=2. -fabi-compat-version . -fabi-compat-version C++ ABI . G++ . . G++ . -fabi-version=2 ( GCC 3.4 4.9 ) : * (template) (reference type) mangling : extern int N; template struct S {}; void n (S) {2} -fabi-version=3 . * SIMD "__attribute ((vector_size))" mangling (overload) . mangling -fabi-version=4 . * "__attribute ((const))" "noreturn" mangling "decltype" (fold away) . mangling -fabi-version=5 . * (Scoped enumerators) "va_arg" . ABI "int" . ABI mangling "const_cast" "static_cast" / . -fabi-version=6 . * mangling ABI mangling "nullptr_t" . -fabi-version=7 . * mangling cv (substitution candidate) . -fabi-version=8 GCC 5.1 . * decltype(nullptr) (unaligned accesses) . ABI "nullptr_t" . -fabi-version=9 GCC 5.2 . * ia32 ( stdcall regparm ) mangled . -fabi-version=10 GCC 6.1 . -Wpsabi ( C Objective-C C++ Objective-C++) -Wpsabi ABI . AArch64 ARM x86 MIPS RS6000/PowerPC S/390 GCC / C C++ . -Wpsabi GCC . -Wpsabi -Wabi . -Wno-changes-meaning ( C++ Objective-C++) C++ (unqualified) (ill-formed) : struct A; struct B1 { A a; typedef A A; }; // warning, 'A' changes meaning struct B2 { A a; struct A { }; }; // error, 'A' changes meaning B1 B2 . -Wno-changes-meaning . -Wno-error=changes-meaning -fpermissive . -fms-extensions . -Wchar-subscripts "char" . (signed) . -Wall . -Wno-coverage-mismatch -fprofile-use . -fprofile-generate -fprofile-use GCC . . -Wno-coverage-mismatch -Wno-error=coverage-mismatch . . ..IP -Wno-coverage-too-many-conditions 4 -fcondition-coverage (terms) GCC . "gcov_type_unsigned" . . -Wno-coverage-too-many-paths -fpath-coverage GCC . -fpath-coverage-limit . . -Wno-coverage-invalid-line-number (linenum) . --coverage . . -Wno-coverage-invalid-line-number -Wno-error=coverage-invalid-line-number . -Wno-cpp ( C Objective-C C++ Objective-C++ Fortran) "#warning". -Wdouble-promotion ( C C++ Objective-C Objective-C++) (implicit promotion) "float" "double" . - << >> (single-precision) "float" "double" . "double" . "double" "double" . : float area(float radius) { return 3.14159 * radius * radius; } "double" "double" . -Wduplicate-decl-specifier ( C Objective-C) (specifier) "const" "volatile" "restrict" "_Atomic" . -Wall . -Wformat -Wformat=n "printf" "scanf" (format string) . (format attributes) "printf" "scanf" "strftime" "strfmon" ( X/Open C ) ( ). -ffreestanding -fno-builtin . GNU libc 2.2 . ISO C90 C99 Single Unix Specification BSD GNU . GCC . -Wpedantic -Wformat ( "strfmon" C ). -Wformat=1 -Wformat -Wformat -Wformat=1 -Wno-format -Wformat=0 . -Wformat (null) -Wformat -Wnonnull . : -Wno-format-contains-nul -Wno-format-extra-args -Wno-format-zero-length. -Wformat -Wall . -Wformat=2 -Wformat . -Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k . -Wno-format-contains-nul -Wformat NUL . -Wno-format-extra-args -Wformat "printf" "scanf" . C . $ "va_arg" . "scanf" Single Unix Specification . -Wformat-overflow -Wformat-overflow=level / "sprintf" "vsprintf" . (heuristics) level . (false positives) . -Wformat-overflow -Wformat-overflow=1 1 -Wformat-overflow -Wformat . . . "sprintf" a b NUL ('\0') . . void f (int a, int b) { char buf [13]; sprintf (buf, "a = %i, b = %i\n", a, b); } -Wformat-overflow=2 2 . 2 . . 2 a "INT_MIN" - %i . . GCC . . . (length modifier) . a b "short int" %hi (cast) "short" . void f (int a, int b) { char buf [23]; sprintf (buf, "a = %hi, b = %i\n", a, (short)b); } -Wformat (zero-length) . C . -Wformat-nonliteral -Wformat "va_list" . -Wformat-security -Wformat . "printf" "scanf" "printf (foo);" . %n . ( -Wformat-nonliteral -Wformat-security -Wformat-nonliteral .) -Wformat-signedness -Wformat (unsigned) (signed) . -Wformat-truncation -Wformat-truncation=level / "snprintf" "vsnprintf" . level . . -Wformat-overflow . -Wformat-truncation -Wformat-truncation=1 1 -Wformat-truncation -Wformat . -Wformat-truncation=2 2 . -Wformat-y2k -Wformat "strftime" . -Wnonnull (null pointer) "nonnull" . -Wnonnull -Wall -Wformat . -Wno-nonnull . -Wnonnull-compare "nonnull" null . -Wnonnull-compare -Wall . -Wno-nonnull-compare . -Wnull-dereference . -fdelete-null-pointer-checks . . -Wno-musttail-local-addr ( C++ ) "musttail" . (tail call) . -Wmaybe-musttail-local-addr "musttail" "musttail" . int foo (int *); int bar (int *x) { if (x[0] == 1) { int a = 42; foo (&a); /* Without the C attribute this call would not be tail called, because address of the C variable escapes and the second foo call could dereference it. With the attribute the local variables are assumed to go out of scope immediately before the tail call instruction and the compiler warns about this. */ [[gnu::musttail]] return foo (nullptr); } else { { int a = 42; foo (&a); } /* The C variable isn't already in scope, so even when it escaped, even without C attribute it would be undefined behavior to dereference it and the compiler could turn this into a tail call. No warning is diagnosed here. */ [[gnu::musttail]] return foo (nullptr); } } -Wextra . -Wnrvo ( C++ Objective-C++) [class.copy.elision] . << >> (Named Return Value Optimization) . v1 v2 . std::vector f() { std::vector v1, v2; // ... if (cond) return v1; else return v2; // warning: not eliding copy } -Winfinite-recursion . . -Winfinite-recursion -Wall . -Wanalyzer-infinite-recursion ( -fanalyzer) . -Winit-self ( C C++ Objective-C Objective-C++) . -Wuninitialized . GCC "i" -Winit-self : int f() { int i = i; return i; } C++ -Wall . -Wno-implicit-int ( C Objective-C) . C99 C -Wall . -fpermissive ( ) -Wno-error=implicit-int . -pedantic-errors . -Wno-implicit-function-declaration ( C Objective-C) . C99 C -Wall . -fpermissive ( ) -Wno-error=implicit-function-declaration . -pedantic-errors . -Wimplicit ( C Objective-C) -Wimplicit-int -Wimplicit-function-declaration . -Wall . -Whardened -fhardened ( -fhardened ) . -fhardened -fstack-protector -Whardened -fstack-protector-strong -fhardened . -fhardened ..IP -Wimplicit-fallthrough 4 -Wimplicit-fallthrough -Wimplicit-fallthrough=3 -Wno-implicit-fallthrough -Wimplicit-fallthrough=0 . -Wimplicit-fallthrough=n (case) switch (fall through ) . : switch (cond) { case 1: a = 1; break; case 2: a = 2; case 3: a = 3; break; } case return noreturn . -Wimplicit-fallthrough= if . : switch (cond) { case 1: if (i > 3) { bar (5); break; } else if (i < 1) { bar (0); } else return; default: ... } switch GCC "__attribute__ ((fallthrough))" (null statement) : switch (cond) { case 1: bar (0); __attribute__ ((fallthrough)); default: ... } C++17 -Wimplicit-fallthrough "[[fallthrough]];" GNU . C++11 C++14 "[[gnu::fallthrough]];" GNU . (fallthrough) . C C++ . n : *<-Wimplicit-fallthrough=0 .> *<-Wimplicit-fallthrough=1 ".*" > (fallthrough) . *<-Wimplicit-fallthrough=2 > ".*falls?[ \t-]*thr(ough|u).*" . *<-Wimplicit-fallthrough=3 > : *<"-fallthrough"> *<"@fallthrough@"> *<"lint -fallthrough[ \t]*"> *<"[ \t.!]*(ELSE,? |INTENTIONAL(LY)? )?FALL(S | |-)?THR(OUGH|U)[ \t.!]*(-[^\n\r]*)?"> *<"[ \t.!]*(Else,? |Intentional(ly)? )?Fall((s | |-)[Tt]|t)hr(ough|u)[ \t.!]*(-[^\n\r]*)?"> *<"[ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?"> *<-Wimplicit-fallthrough=4 > : *<"-fallthrough"> *<"@fallthrough@"> *<"lint -fallthrough[ \t]*"> *<"[ \t]*FALLTHR(OUGH|U)[ \t]*"> *<-Wimplicit-fallthrough=5 > (attributes) . "case" "default" "case" "default" . switch (cond) { case 1: bar (0); /* FALLTHRU */ default: ... } -Wimplicit-fallthrough=3 -Wextra . -Wno-if-not-aligned ( C C++ Objective-C Objective-C++) "warn_if_not_aligned" . . -Wignored-qualifiers ( C C++) (type qualifier) "const" . ISO C lvalue . C++ "void" . ISO C "void" . -Wextra . -Wno-ignored-attributes ( C C++) . -Wattributes . . -Wmain "main" . "main" (external linkage) int . C++ -Wall -Wpedantic . -pedantic-errors . -Wmisleading-indentation ( C C++) (indentation) . "if" "else" "while" "for" . <> <> . if (some_condition ()) foo (); bar (); /* Gotcha: this is not guarded by the "if". */ Tab (space) -ftabstop= ( ). . if (flagA) foo (0); #if SOME_CONDITION_THAT_DOES_NOT_HOLD if (flagB) #endif foo (1); "#line" . -Wall C C++ ..IP -Wmissing-attributes 4 . (aliases) . . -Wattribute-alias=2 . "alloc_align" "alloc_size" "cold" "const" "hot" "leaf" "malloc" "nonnull" "noreturn" "nothrow" "pure" "returns_nonnull" "returns_twice" . ++C (explicit specialization) "alloc_align" "alloc_size" "assume_aligned" "format" "format_arg" "malloc" "nonnull" . "deprecated" "error" "warning" . "copy" . . -Wmissing-attributes -Wall . "malloc" "alloc_size" . template T* __attribute__ ((malloc, alloc_size (1))) allocate (size_t); template <> void* __attribute__ ((malloc)) // missing alloc_size allocate (size_t); -Wmissing-braces (aggregate) (union) . "a" "b" . int a[2][2] = { 0, 1, 2, 3 }; int b[2][2] = { { 0, 1 }, { 2, 3 } }; -Wall . -Wmissing-include-dirs ( C C++ Objective-C Objective-C++ Fortran) include . C C++ Objective-C Objective-C++ . Fortran -I -J . -Wno-missing-profile -fprofile-use . -fprofile-generate -fprofile-use . . (.gcda) GCC . . . -Wno-missing-profile . -Wmismatched-dealloc . "malloc" . "calloc" "malloc" "realloc" "free" "operator new" "operator delete" ++C -fno-builtin . "mydealloc" "myalloc" . void mydealloc (void*); __attribute__ ((malloc (mydealloc, 1))) void* myalloc (size_t); void f (void) { void *p = myalloc (32); // ...use p... free (p); // warning: not a matching deallocator for myalloc mydealloc (p); // ok } ++C -Wmismatched-new-delete "operator new" "operator delete" . -Wmismatched-dealloc -Wall . -Wmultistatement-macros "if" "else" "for" "switch" "while" . : #define DOIT x++; y++ if (c) DOIT; "y" "c" . do-while : #define DOIT do { x++; y++; } while (0) if (c) DOIT; -Wall C ++C . -Wparentheses . "x<=y<=z" "(x<=y ? 1 : 0) <= z" . "?:" . "?": . . ++C : { // Declares a local variable called mymutex. std::unique_lock (mymutex); // User meant std::unique_lock lock (mymutex); } -Wall . -Wno-self-move ( C++ Objective-C++) "std::move" (move) . "std::move" . struct T { ... }; void fn() { T t; ... t = std::move (t); } -Wall . -Wsequence-point (sequence point) C ++C . C ++C C/++C : . ( ) "&&" "||" "? :" "," () ( ) . . . . . C ++C << . .>>. . "a = a++;" "a[n] = b[n++]" "a[i++] = i;". . C++17 : . C ++C . . GCC . -Wall C ++C ..IP -Wno-return-local-addr 4 ( ++C ) (scope) . -Wreturn-mismatch return "void" . "return" "void" "void" . (GNU extension) -Wpedantic . -"void" ( "main") (undefined) . C . C99 . -fpermissive ( ) -Wno-error=return-mismatch . -Wreturn-type "int" ( -Wimplicit-int ). . -"void" "main" . C ++C -"void" "main" . ++C -Wall . -Wno-shift-count-negative . . -Wno-shift-count-overflow (bit width) . . -Wshift-negative-value . -Wextra C99 ( ) C++11 C++17 . -Wno-shift-overflow -Wshift-overflow=n . -Wshift-overflow=1 -Wshift-overflow C99 C++11 ( ) . . ( C .) C++20 ( ) (wrap ). -Wshift-overflow=2 C++14 ( ) . -Wswitch "switch" "case" . ( "default" .) "case" "flag_enum" . -Wall . -Wswitch-default "switch" "default" . -Wswitch-enum "switch" "case" . "case" "flag_enum" . -Wswitch "default" . -Wno-switch-bool "switch" (boolean) case . (cast) "bool" . : switch ((int) (a == 4)) { ... } C ++C . -Wno-switch-outside-range "case" "switch" . C ++C . -Wno-switch-unreachable "switch" case . : switch (cond) { i = 15; ... case 5: ... } case (declaration) -Wswitch-unreachable : switch (cond) { int i; ... case 5: i = 5; ... } C ++C . -Wsync-nand ( C ++C) (built-in) "__sync_fetch_and_nand" "__sync_nand_and_fetch" . GCC 4.4 . -Wtrivial-auto-var-init "-ftrivial-auto-var-init" . case "switch" . -Wunused-but-set-parameter . "unused" . -Wunused -Wextra . -Wunused-but-set-variable . -Wall . "unused" . -Wunused -Wall . -Wunused-function static static inline . -Wall . -Wunused-label . -Wall . "unused" . -Wunused-local-typedefs ( C Objective-C ++C Objective-C++) typedef . -Wall . -Wunused-parameter . "-Wunused" "-Wextra" . "unused" . -Wno-unused-result "warn_unused_result" . -Wunused-result ..IP -Wunused-variable 4 (static) . C -Wunused-const-variable=1 ++C . -Wall . "unused" . -Wunused-const-variable -Wunused-const-variable=n (constant static) . "unused" . -Wunused-const-variable=1 static const static const . -Wunused-const-variable=1 C -Wunused-variable -Wunused ++C . C ++C const "#define" . -Wunused-const-variable=2 ( ) . -Wunused-const-variable . C ++C . -Wunused-value . "void" . - . "x[i,j]" "x[(void)i,j]" . -Wall . -Wunused -Wunused . -Wextra -Wunused ( -Wall -Wunused ) -Wunused-parameter / -Wunused-but-set-parameter . -Wunused -Wunused-const-variable=1 -Wunused-const-variable C ++C. -Wuse-after-free ( C Objective-C ++C Objective-C++) -Wuse-after-free=n . . -Wuse-after-free=1 "realloc" . "free" . ( ) . -Wuse-after-free=2 . ( ) . "free" : struct A { int refcount; void *data; }; void release (struct A *p) { int refcount = --p->refcount; free (p); if (refcount == 0) free (p->data); // warning: p may be used after free } -Wuse-after-free=3 . "realloc" . . : void adjust_pointers (int**, int); void grow (int **p, int n) { int **q = (int**)realloc (p, n *= 2); if (q == p) return; adjust_pointers ((int**)q, n); } . . -Wuse-after-free=2 -Wall . -Wuseless-cast ( C Objective-C ++C Objective-C++) . : struct S { }; void g (S&&); void f (S&& arg) { g (S(arg)); // make arg prvalue so that it can bind to S&& } -Wuninitialized . ++C "const" . ( ++C ) "const" (built- in) . (-Wmaybe-uninitialized .) -Winit-self . (union) . "volatile" . GCC . . ++C (member-initializer-lists) . GCC "b" : struct A { int a; int b; A() : a(b) { } }; -Wno-invalid-memory-model __atomic Builtins __sync Builtins C11 "memory_order" . "__atomic_store" "__atomic_store_n" relaxed release sequentially consistent : void store (int *i) { __atomic_store_n (i, 0, memory_order_consume); } -Winvalid-memory-model ..IP -Wmaybe-uninitialized 4 . ( C++ ) "const" . (-Wuninitialized .) "access (none)" . GCC . GCC . : { int x; switch (y) { case 1: x = 1; break; case 2: x = 4; break; case 3: x = 5; } foo (x); } "y" 1 2 3 "x" GCC . (default) assert(0) . (non-volatile) "longjmp" . "setjmp" "longjmp" . "longjmp" . "noreturn" . -Wall -Wextra . -Wunknown-pragmas "#pragma" GCC . . -Wall . -Wno-pragmas . : -Wunknown-pragmas. -Wno-pragma-once-outside-header "#pragma once" . -Wno-prio-ctor-dtor 0 100 . (constructor) (destructor) "main" . 100 0 100 . -Wstrict-aliasing -fstrict-aliasing . (strict aliasing) . . -Wall . -Wstrict-aliasing=3 . -Wstrict-aliasing=n -fstrict-aliasing . . ( ) . -O . -Wstrict-aliasing -Wstrict-aliasing=3 . 1: . -fstrict-aliasing . . . (front end) . 2: . ( 1) ( 1). 1 . (incomplete types) . . 3 ( -Wstrict-aliasing): . 1 2 . : "*(int*)&some_float". (back end) (points-to) . . . -Wstrict-overflow -Wstrict-overflow=n . . : . . . : . . . -Wstrict-overflow=1 . "x + 1 > x" 1 . -Wstrict-overflow -Wall . -Wstrict-overflow=2 . : "abs (x) >= 0". "abs (INT_MIN)" "INT_MIN" . -Wstrict-overflow ( ) -Wstrict-overflow=2 . -Wstrict-overflow=3 . : "x + 1 > 1" "x > 0" . -Wstrict-overflow=4 . : "(x * 10) / 5" "x * 2" . -Wstrict-overflow=5 . : "x + 2 > y" "x + 1 >= y" . . -Wstring-compare "strcmp" "strncmp" ( "strncmp") . . "strcmp" "a" . extern char a[4]; void f (char *d) { strcpy (d, "string"); ... if (0 == strcmp (a, d)) // cannot be true puts ("a and d are the same"); } -Wstring-compare -Wextra . -Wno-stringop-overflow -Wstringop-overflow (memory overrun) "memcpy" "strcpy" . (Object Size Checking) . "memcpy" Object Size Checking . "SIZE_MAX / 2" . (built-in) GCC "__builtin_memcpy" . "__builtin___memcpy_chk" . "strcpy" ( "blue" "NUL" ) . enum Color { blue, purple, yellow }; const char* f (enum Color clr) { static char buf [4]; const char *str; switch (clr) { case blue: str = "blue"; break; case purple: str = "purple"; break; case yellow: str = "yellow"; break; } return strcpy (buf, str); // warning here } . - - : void f (int[static 4]); void g (void) { int *p = (int *) malloc (1 * sizeof(int)); f (p); // warning here } -Wstringop-overflow=2 . -Wstringop-overflow -Wstringop-overflow=1 -Wstringop-overflow=1 Object Size Checking . . . "_FORTIFY_SOURCE" . -Wstringop-overflow=2 -Wstringop-overflow=2 Object Size Checking . . . . -Wstringop-overflow=3 -Wstringop-overflow=3 Object Size Checking . . . -Wstringop-overflow=4 -Wstringop-overflow=4 Object Size Checking . . -Wstringop-overflow=3 . -Wno-stringop-overread "memchr" "strcpy" . -Wstringop-overread . -Wno-stringop-truncation "strncat" "strncpy" "stpncpy" (truncate) . "strncat" . . "bufsize - strlen (buf) - 1)" . void append (char *buf, size_t bufsize) { strncat (buf, ".txt", 3); } "strncpy" "NUL" "d" "NUL" . "strncpy" "NUL" . "NUL" "memcpy" . void copy (char *d, const char *s) { strncpy (d, s, strlen (s)); } "strncpy" . "NUL" . . "sizeof buf - 1" "NUL" . void copy (const char *s) { char buf[80]; strncpy (buf, s, sizeof buf); ... } "NUL" "nonstring" . "NUL" . GCC . -Wstrict-flex-arrays ( C C++) (flexible array members) level "strict_flex_array (level)" level -fstrict-flex-arrays=level . "-Wstrict-flex-arrays" level 0 . level=1 . level=2 level=1 . level=3 level=2 . -ftree-vrp ( -O2 ) . -Wsuggest-attribute=attribute-name (attribute) . attribute-name . -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wmissing-noreturn -Wsuggest-attribute=malloc -Wsuggest-attribute=returns_nonnull "pure" "const" "noreturn" "malloc" "returns_nonnull" . (compilation units) ( "pure" "const") . "abort" (trapping) . -fipa-pure-const -O . . -Wsuggest-attribute=format -Wmissing-format-attribute "format" . . GCC "format" (return) "format" . "format" . GCC "format" . . GCC "format" "vprintf" "vscanf" "format" . -Wsuggest-attribute=cold "cold" . "cold" (wrappers) "throw" ++C "abort" . -Walloc-size "alloc_size" (built-in) "aligned_alloc" "alloca" "calloc" "malloc" "realloc". -Walloc-zero "alloc_size" "aligned_alloc" "alloca" "calloc" "malloc" "realloc". ( "realloc" ) . -Wcalloc-transposed-args "alloc_size" "sizeof" . . "calloc" "calloc (n, sizeof (int))" "calloc (sizeof (int), n)" . "sizeof" "calloc (sizeof (struct S) + 0, n)" "calloc (1 * sizeof (struct S), 4)" "sizeof" . -Walloc-size-larger-than=byte-size "alloc_size" PTRDIFF_MAX . -Walloc-size-larger-than=PTRDIFF_MAX . byte-size SIZE_MAX -Wno-alloc-size-larger-than . -Wno-alloc-size-larger-than -Walloc-size-larger-than= . -Walloc-size-larger-than=SIZE_MAX . -Walloca "alloca" . -Walloca-larger-than=byte-size "alloca" (controlling predicate) byte-size . "alloca" . . "alloca" : void func (size_t n) { void *p; if (n <= 1000) p = alloca (n); else p = malloc (n); f (p); } "-Walloca-larger-than=1000" "alloca" . "-Walloca-larger-than=500" . "alloca" . : void func () { void *p = alloca (n); f (p); } "-Walloca-larger-than=500" . : void func (signed int n) { if (n < 500) { p = alloca (n); f (p); } } n "alloca" . "alloca" . -Walloca-larger-than=PTRDIFF_MAX -ftree-vrp ( -O2 ). : -Wvla-larger-than=byte-size. -Wno-alloca-larger-than -Walloca-larger-than= . -Walloca-larger-than=SIZE_MAX . -Warith-conversion . -Wconversion -Wfloat-conversion -Wsign-conversion . void f (char c, int i) { c = c + i; // warns with B<-Wconversion> c = c + 1; // only warns with B<-Warith-conversion> } -Warray-bounds -Warray-bounds=n . -Wall . -ftree-vrp ( -O2 ) . -Warray-bounds -Warray-bounds=n (flexible array member) C99 ([]) GCC ([0]) ([1]) . . -fstrict-flex-arrays -fstrict-flex-arrays=level : level<=1 . level=2 level=3 level=2 . -Warray-bounds -Wall . -Warray-bounds=2 . . -Wunterminated-string-initialization ( C Objective-C) "nonstring" . : char arr[3] = "foo"; /* Warning. */ char arr2[3] __attribute__((nonstring)) = "bar"; /* No warning. */ -Wextra . -Wc++-compat "nonstring" C++ . -Warray-compare . C++20 . : int arr1[5]; int arr2[5]; bool same = arr1 == arr2; -Warray-compare -Wall . -Warray-parameter -Warray-parameter=n -Warray-bounds . . -Warray-bounds -Wstringop-overflow . "T[static N]" . "f" "static" "f" . void f (int[static 4]); void f (int[]); // warning (inconsistent array form) void g (void) { int *p = (int *)malloc (1 * sizeof (int)); f (p); // warning (array too small) ... } . . void g (int*); void g (int[]); // no warning void g (int[8]); // warning (inconsistent array bound) -Warray-parameter=2 -Wall . -Wvla-parameter (Variable Length Array) . -Warray-parameter -Warray-parameter=2 . -Wno-array-parameter -Warray-parameter=0 . -Wattribute-alias=n -Wno-attribute-alias "alias" . -Wattribute-alias=1 -Wattribute-alias . . -Wattribute-alias=2 -Wattribute-alias . . . -Wmissing-attributes . "alloc_align" "alloc_size" "cold" "const" "hot" "leaf" "malloc" "nonnull" "noreturn" "nothrow" "pure" "returns_nonnull" "returns_twice" . -Wattribute-alias -Wattribute-alias=1 . . -Wno-attribute-alias -Wattribute-alias=0 . -Wbidi-chars=[none|unpaired|any|ucn] UTF-8 . ( ) . . GCC . -Wbidi-chars=unpaired . -Wbidi-chars=none . -Wbidi-chars=any . UCN . -Wbidi-chars=unpaired,ucn -Wbidi-chars=any,ucn . -Wbidi-chars=ucn -Wbidi-chars=any -Wbidi-chars=unpaired,ucn . -Wbool-compare "true"/"false" . (false) : int n = 5; ... if ((n > 1) == 2) { ... } -Wall . -Wbool-operation . . C . ( C++ . C++17 .) -Wall . -Wduplicated-branches if-else . : if (p != NULL) return 0; else return 0; . : int i = x ? *p : *p; -Wduplicated-cond if-else-if . : if (p->q != NULL) { ... } else if (p->q != NULL) { ... } __builtin_frame_address __builtin_return_address 0 . (crash) . -Wall . -Wno-discarded-qualifiers ( C Objective-C) (qualifiers) . "const char *" "char *" . . -Wno-discarded-array-qualifiers ( C Objective-C) . "const int (*)[]" "int (*)[]" . . -Wno-incompatible-pointer-types ( C Objective-C) . -Wno-pointer-sign (signedness) . C99 C GCC . -fpermissive ( ) -Wno-error=incompatible-pointer-types . -pedantic-errors . -Wno-int-conversion ( C Objective-C) . (implicit) (explicit) -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast . C99 C GCC . -fpermissive ( ) -Wno-error=int-conversion . -pedantic-errors . -Wzero-as-null-pointer-constant 0 (null pointer constant) . -Wzero-length-bounds . (undefined) . "bad" "b" "c" . -Warray-bounds . struct X { int a[0]; int b, c; }; struct X x; void bad (void) { x.a[0] = 0; // -Wzero-length-bounds x.a[1] = 1; // -Wzero-length-bounds x.a[2] = 2; // -Warray-bounds } -Wzero-length-bounds -Warray-bounds . -Wno-div-by-zero . (infinities) NaN . -Wsystem-headers (system headers) . . GCC . -Wall --- -Wunknown-pragmas . -Wtautological-compare (true) (false) . : int i = 1; ... if (i > i) { ... } : if ((a & 16) == 10) { ... } (false) . -Wall . -Wtrailing-whitespace -Wtrailing-whitespace=kind (trailing whitespace) (raw string literals) . "-Wtrailing-whitespace" "-Wtrailing-whitespace=blanks" (space) . "-Wtrailing-whitespace=any" form feed . "-Wno-trailing-whitespace" "-Wtrailing-whitespace=none" . . -Wleading-whitespace=kind (leading whitespace) (indentation). ( "-ftabstop=n") n . ( "-Wtrailing-whitespace=" ) . . "-Wleading-whitespace=spaces" (space) . "-Wleading-whitespace=tabs" . "-Wleading-whitespace=blanks" n ( n "-ftabstop=n" ). "-Wleading-whitespace=none" . . -Wtrampolines (trampolines) (nested functions) . . . (executable) . -Wfloat-equal . ( ) . ( ) ( ). . -Wtraditional ( C Objective-C) C (traditional C) ISO C . ISO C C / . * . C ISO C . * C . (directive) # . -Wtraditional C # . "#pragma" C . "#elif" . * (function-like) . * (+). * U F L. (C L .) _MIN/_MAX "". GCC . * external ..IP * 4 "switch" "long" . * -"static" "static" . C . * ISO . . * ISO . * (automatic aggregates). * (labels) . C . * (unions). . "__STDC__" C . * (prototypes) / . C . -Wtraditional-conversion . * ISO C. (variadic) ISO C C libiberty "PARAMS" "VPARAMS" . (nested functions) GCC C . -Wtraditional-conversion ( C Objective-C) . (default promotion) . -Wdeclaration-after-statement ( C Objective-C) . C++ ISO C99 GCC . ISO C90 . -pedantic-errors . -Wshadow ( C++) ( Objective-C) (shadow ) (built-in) . C++ typedef struct/class/enum . . -Wshadow -Wno-shadow=local -Wno-shadow=compatible-local . -Wshadow=global. -Wno-shadow-ivar ( Objective-C) Objective-C . -Wshadow=global (shadowing) . -Wshadow. -Wshadow=local . -Wshadow=compatible-local . C++ . ( -Wshadow=local) : for (SomeIterator i = SomeObj.begin(); i != SomeObj.end(); ++i) { for (int i = 0; i < N; ++i) { ... } ... } "i" -Wshadow=compatible-local . (type checking) . -Wshadow=local . "const char *i" "char *i" . -Wshadow=local . -Wlarger-than=byte-size byte-size . -Wlarger-than=PTRDIFF_MAX . byte-size SIZE_MAX -Wno-larger-than . (bounded functions) "memchr" "strnlen" ( PTRDIFF_MAX ) . -Wno-larger-than . -Wno-larger-than -Wlarger-than= . -Wlarger-than=SIZE_MAX . -Wframe-larger-than=byte-size byte-size . . byte-size . "alloca" (variable-length arrays) . -Wframe-larger-than=PTRDIFF_MAX . byte-size SIZE_MAX -Wno-frame-larger-than . -Wno-frame-larger-than -Wframe-larger-than= . -Wframe-larger-than=SIZE_MAX . -Wfree-nonheap-object (heap) . "stpcpy" "free" . void f (char *p) { p = stpcpy (p, "abc"); // ... free (p); // warning } -Wfree-nonheap-object -Wall . -Wstack-usage=byte-size (stack usage) byte-size . . "alloca" . -fstack-usage . * : warning: stack usage is 1120 bytes * ( ) : warning: stack usage might be 1648 bytes * ( ) : warning: stack usage might be unbounded -Wstack-usage=PTRDIFF_MAX . byte-size SIZE_MAX -Wno-stack-usage . -Wno-stack-usage -Wstack-usage= . -Wstack-usage=SIZE_MAX . -Wunsafe-loop-optimizations . -funsafe-loop-optimizations ..IP "-Wno-pedantic-ms-format ( MinGW)" 4 -Wformat -pedantic GNU ISO "printf" / "scanf" "I32" "I64" "I" Windows MS . -Wpointer-arith <<>> "void" . GNU C "void *" . C++ "NULL" . -Wpedantic . -pedantic-errors . -Wno-pointer-compare . (dereference) . : const char *p = foo (); if (p == '\0') return 42; C++11 . . -Wno-tsan ThreadSanitizer . ThreadSanitizer "std::atomic_thread_fence" . -Wtype-limits . "<" ">=" . -Wextra . -Wabsolute-value ( C Objective-C) . abs(3.14) double "fabs" . . (explicit cast) -Wextra . -Wcomment -Wcomments /* /* - // . -Wall . -Wtrigraphs (trigraphs) . . -Wall . -Wall . -Wall -trigraphs -Wall -Wno-trigraphs . -Wundef "#if" . . -Wexpansion-to-defined defined ( #if ) . . -Wpedantic -Wextra . -Wunused-macros . . . (include) . : . . : #if defined the_macro_causing_the_warning #endif -Wno-endif-labels "#else" "#endif" . : #if FOO ... #else FOO ... #endif FOO "FOO" . . -Wbad-function-cast ( C Objective-C) (cast) . . -Wc90-c99-compat ( C Objective-C) ISO C90 ISO C99 . "long long" "bool" (compound literals) (designated initializers) . . "__extension__" . -Wc99-c11-compat ( C Objective-C) ISO C99 ISO C11 . "_Atomic" "_Thread_local" "_Alignas" "Alignof" "_Generic" . . "__extension__" . -Wc11-c23-compat ( C Objective-C) -Wc11-c2x-compat ( C Objective-C) ISO C11 ISO C23 . "_Static_assert" [[]] (attributes) . . "__extension__" . -Wc11-c2x-compat . C23 -pedantic-errors . -Wc23-c2y-compat ( C Objective-C) -Wc23-c2y-compat ( C Objective-C) ISO C23 ISO C2Y . "_Generic" . . "__extension__" . C2Y -pedantic-errors . -Wc++-compat ( C Objective-C) ISO C ISO C ISO C++ "void *" -"void". -Wc++11-compat ( C++ Objective-C++) C++ ISO C++ 1998 ISO C++ 2011 ISO C++ 1998 ISO C++ 2011 . -Wnarrowing -Wall . -Wc++14-compat ( C++ Objective-C++) C++ ISO C++ 2011 ISO C++ 2014 . -Wall . -Wc++17-compat ( C++ Objective-C++) C++ ISO C++ 2014 ISO C++ 2017 . -Wall . -Wc++20-compat ( C++ Objective-C++) C++ ISO C++ 2017 ISO C++ 2020 . -Wall . -Wno-c++11-extensions ( C++ Objective-C++) C++11 C++ . C++11 -Wpedantic . -Wno-c++14-extensions ( C++ Objective-C++) C++14 C++ . C++14 -Wpedantic ..IP "-Wno-c++17-extensions ( C++ Objective-C++)" 4 C++17 C++ . C++17 -Wpedantic . -Wno-c++20-extensions ( C++ Objective-C++) C++20 C++ . C++20 -Wpedantic . -Wno-c++23-extensions ( C++ Objective-C++) C++23 C++ . C++23 -Wpedantic . -Wno-c++26-extensions ( C++ Objective-C++) C++26 C++ . C++26 -Wpedantic . -Wcast-qual (cast) (type qualifier) . "const char *" "char *" . . "char **" "const char **" : /* p is char ** value. */ const char **q = (const char **) p; /* Assignment of readonly string to const char * is OK. */ *q = "string"; /* Now char** pointer points to read-only memory. */ **p = 'b'; -Wcast-align (alignment) . "char *" "int *" . -Wcast-align=strict . "char *" "int *" . -Wcast-function-type . . . "int" "long" ILP32. . "void (*) (void)" . . -Wextra . -Wcast-user-defined (reference type) . struct A { operator const int&(); } a; auto r = (int&)a; // warning . -Wwrite-strings C "const char[length]" -"const" "char *" . "const" . . -Wall . C++ "char *" . C++ . -pedantic-errors C++11 . -Wclobbered "longjmp" "vfork" . -Wextra . -Wno-complain-wrong-lang . -Wno-complain-wrong-lang : $ g++ -fno-rtti a.cc b.f90 g++ C++ a.cc Fortran b.f90 . : f951: Warning: command-line option '-fno-rtti' is valid for C++/D/ObjC++ but not for Fortran -Wno-complain-wrong-lang . -Wcompare-distinct-pointer-types ( C Objective-C) . . -Wconversion . "abs (x)" "x" "double" "unsigned ui = -1" "sqrtf (M_PI)" . "abs ((int) x)" "ui = (unsigned) -1" "abs (2.0)" . -Wno-sign-conversion . C++ (overload resolution) : "void" . C++ -Wsign-conversion . -Warith-conversion . -Wdangling-else "else" "if" . : { if (a) if (b) foo (); else bar (); } C/C++ "else" "if" "if (b)" . . GCC . "if" "else" "if" . : { if (a) { if (b) foo (); else bar (); } } -Wparentheses . -Wdangling-pointer -Wdangling-pointer=n ( C++) (automatic storage duration) . (compound literals) . (escaped pointers) . . -Wdangling-pointer=1 (dangling pointers) . -Wdangling-pointer=2 . -Wdangling-pointer -Wdangling-pointer=2 -Wno-dangling-pointer -Wdangling-pointer=0 . -Wdangling-pointer=2 -Wall . (scope) . char f (char c1, char c2, char c3) { char *p; { p = (char[]) { c1, c2, c3 }; } // warning: using dangling pointer 'p' to an unnamed temporary return *p; } "x" *p . void g (int **p) { int x = 7; // warning: storing the address of local variable 'x' in '*p' *p = &x; } s a (scope) . "s" . extern void frob (const char *); void h (char *s) { if (!s) { char a[12] = "tmpname"; s = a; } // warning: dangling pointer 's' to 'a' may be used frob (s); } "__TIME__" "__DATE__" "__TIMESTAMP__" (bit-wise-identical reproducible compilations) . -Wempty-body "if" "else" "do while" . -Wextra . -Wno-endif-labels (stray tokens) "#else" "#endif" . -Wenum-compare (enumerated) . ++C . C -Wall . -Wenum-conversion . C -Wextra . -Wenum-int-mismatch ( C Objective-C) . : enum E { l = -1, z = 0, g = 1 }; int foo(void); enum E foo(void); C "char" . (underlying type) (implementation-defined) (portability) . ++C . C -Wall -Wc++-compat . -Wjump-misses-init ( C Objective-C) "goto" "switch" . . C Objective-C ++C . -Wjump-misses-init -Wc++-compat . -Wno-jump-misses-init . -Wsign-compare . ++C -Wall . C -Wextra . -Wsign-conversion . (explicit cast) . C -Wconversion . -Wflex-array-member-not-at-end ( C ++C) C99 . : struct flex { int length; char data[]; }; struct mid_flex { int m; struct flex flex_data; int n; }; -Wfloat-conversion ( ) . . -Wconversion . -Wno-scalar-storage-order (reverse scalar storage order) . -Wsizeof-array-div sizeof . . : int fn () { int arr[10]; return sizeof (arr) / sizeof (short); } -Wall . -Wsizeof-pointer-div sizeof . "sizeof (ptr) / sizeof (ptr[0])" "ptr" . -Wall . -Wsizeof-pointer-memaccess "sizeof" . "memset (ptr, 0, sizeof (ptr));" "ptr" "memcpy (&foo, ptr, sizeof (&foo));". -Wsizeof-pointer-memaccess "strncat" "strncpy" (bound) "sizeof" . "strncat" . . void make_file (const char *name) { char path[PATH_MAX]; strncpy (path, name, sizeof path - 1); strncat (path, ".text", sizeof ".text"); ... } -Wsizeof-pointer-memaccess -Wall . -Wno-sizeof-array-argument "sizeof" . C ++C . -Wmemset-elt-size "memset" . . -Wall . -Wmemset-transposed-args "memset" . "memset (buf, sizeof buf, 0)" "memset (buf, 0, sizeof buf)" . (literal zero) . . -Wall . -Waddress . (null pointer constant) : void f (void); void g (void) { if (!f) // warning: expression evaluates to false abort (); } (string literal) : void f (const char *x) { if (x == "abc") // warning: expression evaluates to false puts ("equal"); } (null) : void f (const int *p, int i) { return p + i == NULL; } : (true) ( weak symbols) (dereference) . "intptr_t" "uintptr_t" . (unspecified behavior) (non-portable) "strcmp" . (macro expansion) . -Waddress -Wall . -Wno-address-of-packed-member (packed member) (struct) (union) (unaligned pointer) . ..IP -Wlogical-op 4 . . : extern int a; if (a < 0 && a < 0) { ... } -Wlogical-not-parentheses (logical not) . . : int a; ... if (!a > 1) { ... } : if ((!a) > 1) { ... } -Wall . -Waggregate-return (structures) (unions) . ( .) -Wno-aggressive-loop-optimizations . -Waggressive-loop-optimizations . -Wno-attributes "__attribute__" (attributes) . . -pedantic-errors . -Wno-attributes= (scoped) ( C++11 C23) . -Wno-attributes=vendor::attr : [[vendor::attr]] void f(); -Wno-attributes=vendor:: (namespace) : [[vendor::safe]] void f(); [[vendor::unsafe]] void f2(); -Wno-attributes= -Wno-attributes . -Wno-builtin-declaration-mismatch (built- in) (prototype) . -Wextra . -Wbuiltin-declaration-mismatch . (scope) . "memset" "size_t" 32 "int" . -Wextra . extern void* memset (); void f (void *d) { memset (d, '\0', 32); } -Wno-builtin-macro-redefined . "__TIMESTAMP__" "__TIME__" "__DATE__" "__FILE__" "__BASE_FILE__" . -Wfree-labels ( C Objective-C) (label) (compound statement) . C23 C GCC . -Wc11-c23-compat . C C23 -pedantic-errors . -Wheader-guard (multiple inclusion guard) "#define" "#ifndef" "#if !defined" "#define" (object-like) . "#ifndef" "#if !defined" "#define" . -Wall . -Wstrict-prototypes ( C Objective-C) . ( .) -Wold-style-declaration ( C Objective-C) C . (storage- class specifiers) "static" . -Wextra . -Wold-style-definition ( C Objective-C) . . () C23 (void) . -Wdeprecated-non-prototype ( C Objective-C) () . C23 C . -Wc11-c23-compat . -Wmissing-parameter-name ( C Objective-C) . . C23 C GCC . -Wc11-c23-compat . C C23 -pedantic-errors . -Wmissing-parameter-type ( C Objective-C) K&R : void foo(bar) { } -Wextra . -Wno-declaration-missing-parameter-type ( C Objective-C) . . . C99 C . -fpermissive ( ) -Wno-error=declaration-missing-parameter-type . -pedantic-errors . -Wmissing-prototypes ( C Objective-C) (global) . . . C++ (overload) . C++ -Wmissing-declarations . -Wmissing-variable-declarations ( C Objective-C) . extern . -Wmissing-declarations . . C -Wmissing-prototypes . C++ (function templates) (inline functions) ..IP -Wmissing-field-initializers 4 (structure) . "x.h" : struct s { int f, g, h; }; struct s x = { 3, 4 }; C (designated initializers) : struct s { int f, g, h; }; struct s x = { .f = 3, .g = 4 }; C (universal zero initializer) { 0 } : struct s { int f, g, h; }; struct s x = { 0 }; ++C { } : struct s { int f, g, h; }; s x = { }; -Wextra . -Wextra -Wextra -Wno-missing-field-initializers . -Wno-missing-requires concept-id simple-requirement C++20 : bool satisfied = requires { C }; satisfied true C T . : bool satisfied = requires { requires C }; satisfied true (concept) C T . -Wno-missing-requires . -Wno-missing-template-keyword . -> :: (dependent) (template) "template" . template void DoStuff (X x) { x.template DoSomeOtherStuff(); // Good. x.DoMoreStuff(); // Warning, x is dependent. } . . m N : void NotATemplate (my_class t) { int N = 5; bool test = t.m < N > (0); // Treated as a template. test = (t.m < N) > (0); // Same meaning, but not treated as a template. } -Wno-missing-template-keyword . -Wno-multichar ('FOOF') . (implementation-defined) . -Wnormalized=[none|id|nfc|nfkc] ISO C ISO C++ (identifier) . ASCII . ISO 10646 (normalization rules) . GCC . GCC . -Wnormalized=nfc "C" ISO 10646 NFC . NFC . -Wnormalized . ISO C ISO C++ NFC . ISO C ++C NFC . -Wnormalized=id . . -Wnormalized=none -Wno-normalized . ( "D") . ISO 10646 . "\u207F" <> "n" . ISO 10646 NFKC -Wnormalized=nfkc GCC NFKC . O 0 . -Wno-attribute-warning "warning" . . -Wno-attribute-warning -Wno-error=attribute-warning -Werror . -Wno-deprecated . ++C -Wdeprecated -Wcomma-subscript -Wvolatile -Wdeprecated-enum-float-conversion -Wdeprecated-enum-enum-conversion -Wdeprecated-literal-operator -Wdeprecated-variadic-comma-omission. -Wno-deprecated-declarations "deprecated" . -Wno-overflow . -Wno-odr (One Definition Rule) . . -Wopenacc-parallelism OpenACC . -Wno-openmp OpenMP . -Wopenmp-simd (vectorizer cost model) simd OpenMP . -fsimd-cost-model=unlimited . -Woverride-init ( C Objective-C) (designated initializers) . -Wextra . -Wextra -Wextra -Wno-override-init . -Wno-override-init-side-effects ( C Objective-C) . . -Wpacked packed packed . (misalignment) . "f.x" "struct bar" "struct bar" packed : struct foo { int x; char a, b, c, d; } __attribute__((packed)); struct bar { char z; struct foo f; }; 4.1 4.2 4.3 GCC "packed" "char" . GCC 4.4 . GCC 4.4 GCC . "a" "b" : struct foo { char a:4; char b:8; } __attribute__ ((packed)); . -Wno-packed-bitfield-compat . -Wpacked-not-aligned ( C C++ Objective-C Objective-C++) struct union (packed) . "struct S" "warning: alignment 1 of 'struct S' is less than 8": struct __attribute__ ((aligned (8))) S8 { char a[8]; }; struct __attribute__ ((packed)) S { struct S8 s8; }; -Wall . -Wpadded . . -Wredundant-decls (scope) . -Wrestrict "restrict" ( C++ "__restrict") (alias) . "strcpy" . NUL "a[4]" . void foo (void) { char a[] = "abcd1234"; strcpy (a, a + 4); ... } -Wrestrict -O2 . -Wall . -Wnested-externs ( C Objective-C) "extern" . -Winline inline . . . . -Winline . -Winterference-size "std::hardware_destructive_interference_size" C++17 --param destructive-interference-size . . (false sharing) : struct independent_fields { alignas(std::hardware_destructive_interference_size) std::atomic one; alignas(std::hardware_destructive_interference_size) std::atomic two; }; one two (cache line) . --param destructive-interference-size --param constructive-interference-size -mtune L1 (generic). ABI -mtune ( -mcpu) . ABI hardware interference size . --param . ABI -Wno-interference-size . -Wint-in-bool-context (?:) "if (a <= b ? 2 : 3)" "for (a = 0; 1 << a; a++);". . -Wall . -Wno-int-to-pointer-cast (cast) . C++ . Wint-to-pointer-cast . -Wno-pointer-to-int-cast ( C Objective-C) (cast) . -Winvalid-pch (precompiled header) . -Winvalid-utf8 UTF-8 . C++23 -finput-charset=UTF-8 -pedantic-errors . -Wno-unicode . Wunicode . -Wlong-long "long long" . ISO C90 C++98 -Wpedantic -Wtraditional . -Wno-long-long . -pedantic-errors . -Wvariadic-macros (variadic) ISO C90 GNU ISO C99 . -Wpedantic -Wtraditional . -Wno-variadic-macros . -Wno-varargs "va_start" . . -Wvector-operation-performance SIMD . . "piecewise" "in parallel" "as a single scalar" . -Wvla . -Wno-vla -Wpedantic . -pedantic-errors . -Wvla-larger-than=byte-size byte-size . -Walloca-larger-than=byte-size . GCC . -Wvla-larger-than=PTRDIFF_MAX -ftree-vrp ( -O2 ). -Walloca-larger-than=byte-size ..IP -Wno-vla-larger-than 4 -Wvla-larger-than= . -Wvla-larger-than=SIZE_MAX . -Wvla-parameter (VLA) -Warray-bounds . VLA . . "f" "n" . "f" VLA VLA . void f (int n, int[n]); // warning: argument 2 previously declared as a VLA void f (int, int[]); void g (int n) { if (n > 4) return; int a[n]; // warning: access to a by f may be out of bounds f (sizeof a, a); ... } -Wvla-parameter -Wall . -Warray-parameter . -Wvolatile-register-var (register) volatile . volatile / . -Wall . -Wno-xor-used-as-pow ( C C++ Objective-C Objective-C++) "^" XOR . . C C++ "^" XOR ( TeX BASIC) . -Wno-xor-used-as-pow . -Wdisabled-optimization (optimization pass) . GCC . GCC . -Wpointer-sign ( C Objective-C) (signedness) . C Objective-C . -Wall -Wpedantic -Wno-pointer-sign . -pedantic-errors . -Wstack-protector -fstack-protector . (stack smashing) . -Woverlength-strings << >> C . . NUL . C90 C99 . C++98 C++ . -Wpedantic -Wno-overlength-strings . -Wunsuffixed-float-constants ( C Objective-C) . -Wsystem-headers . "FLOAT_CONST_DECIMAL64" C99 . -Wno-lto-type-mismatch (LTO) . -flto . . -Wno-designated-init ( C Objective-C) (positional) "designated_init" . (Options That Control Static Analysis) -fanalyzer << >> . GCC . . (sound) (complete): . . C . : -Wanalyzer-allocation-size -Wanalyzer-deref-before-check -Wanalyzer-double-fclose -Wanalyzer-double-free -Wanalyzer-exposure-through-output-file -Wanalyzer-exposure-through-uninit-copy -Wanalyzer-fd-access-mode-mismatch -Wanalyzer-fd-double-close -Wanalyzer-fd-leak -Wanalyzer-fd-phase-mismatch -Wanalyzer-fd-type-mismatch -Wanalyzer-fd-use-after-close -Wanalyzer-fd-use-without-check -Wanalyzer-file-leak -Wanalyzer-free-of-non-heap -Wanalyzer-imprecise-fp-arithmetic -Wanalyzer-infinite-loop -Wanalyzer-infinite-recursion -Wanalyzer-jump-through-null -Wanalyzer-malloc-leak -Wanalyzer-mismatching-deallocation -Wanalyzer-null-argument -Wanalyzer-null-dereference -Wanalyzer-out-of-bounds -Wanalyzer-overlapping-buffers -Wanalyzer-possible-null-argument -Wanalyzer-possible-null-dereference -Wanalyzer-putenv-of-auto-var -Wanalyzer-shift-count-negative -Wanalyzer-shift-count-overflow -Wanalyzer-stale-setjmp-buffer -Wanalyzer-tainted-allocation-size -Wanalyzer-tainted-array-index -Wanalyzer-tainted-assertion -Wanalyzer-tainted-divisor -Wanalyzer-tainted-offset -Wanalyzer-tainted-size -Wanalyzer-undefined-behavior-ptrdiff -Wanalyzer-undefined-behavior-strtok -Wanalyzer-unsafe-call-within-signal-handler -Wanalyzer-use-after-free -Wanalyzer-use-of-pointer-in-stale-stack-frame -Wanalyzer-use-of-uninitialized-value -Wanalyzer-va-arg-type-mismatch -Wanalyzer-va-list-exhausted -Wanalyzer-va-list-leak -Wanalyzer-va-list-use-after-va-end -Wanalyzer-write-to-const -Wanalyzer-write-to-string-literal GCC . -Wanalyzer-symbol-too-complex -fanalyzer . --param analyzer-max-svalue-depth=value . -Wanalyzer-symbol-too-complex . -Wanalyzer-too-complex -fanalyzer . . -Wanalyzer-too-complex ..IP -Wno-analyzer-allocation-size 4 -fanalyzer -Wno-analyzer-allocation-size . "sizeof (*pointer)" . CWE-131: Incorrect Calculation of Buffer Size ("https://cwe.mitre.org/data/definitions/131.html"). -Wno-analyzer-deref-before-check -fanalyzer -Wno-analyzer-deref-before-check . * * (dereference) "NULL" NULL . NULL . "__attribute__((nonnull))" -NULL "NULL" . GCC NULL <<>> . . -Wno-analyzer-double-fclose -fanalyzer -Wno-analyzer-double-fclose . "fclose" "FILE *" . CWE-1341: Multiple Releases of Same Resource or Handle ("https://cwe.mitre.org/data/definitions/1341.html"). -Wno-analyzer-double-free -fanalyzer -Wno-analyzer-double-free . "free" "malloc" . CWE-415: Double Free ("https://cwe.mitre.org/data/definitions/415.html"). -Wno-analyzer-exposure-through-output-file -fanalyzer -Wno-analyzer-exposure-through-output-file . ( ). CWE-532: Information Exposure Through Log Files ("https://cwe.mitre.org/data/definitions/532.html"). -Wanalyzer-exposure-through-uninit-copy -fanalyzer (plugin) << >> . -Wno-analyzer-exposure-through-uninit-copy . << >> (infoleaks) - ( (struct) ). CWE-200: Exposure of Sensitive Information to an Unauthorized Actor ("https://cwe.mitre.org/data/definitions/200.html"). -Wno-analyzer-fd-access-mode-mismatch -fanalyzer -Wno-analyzer-fd-access-mode-mismatch . "read" - . "fd_arg_read (N)" "O_WRONLY" "N" "fd_arg_write (N)" "O_RDONLY" N . -Wno-analyzer-fd-double-close -fanalyzer -Wno-analyzer-fd-double-close . . CWE-1341: Multiple Releases of Same Resource or Handle ("https://cwe.mitre.org/data/definitions/1341.html"). -Wno-analyzer-fd-leak -fanalyzer -Wno-analyzer-fd-leak . ( ). CWE-775: Missing Release of File Descriptor or Handle after Effective Lifetime ("https://cwe.mitre.org/data/definitions/775.html"). -Wno-analyzer-fd-phase-mismatch -fanalyzer -Wno-analyzer-fd-phase-mismatch . . "accept" (stream socket) "listen" . CWE-666: Operation on Resource in Wrong Phase of Lifetime ("https://cwe.mitre.org/data/definitions/666.html"). -Wno-analyzer-fd-type-mismatch -fanalyzer -Wno-analyzer-fd-type-mismatch . . "open" . -Wno-analyzer-fd-use-after-close -fanalyzer -Wno-analyzer-fd-use-after-close . . "fd_arg (N)" "fd_arg_read (N)" "fd_arg_write (N)" "N" . -Wno-analyzer-fd-use-without-check -fanalyzer -Wno-analyzer-fd-use-without-check . . "fd_arg (N)" "fd_arg_read (N)" "fd_arg_write (N)" "N" . -Wno-analyzer-file-leak -fanalyzer -Wno-analyzer-file-leak . "FILE *" "" ( ). CWE-775: Missing Release of File Descriptor or Handle after Effective Lifetime ("https://cwe.mitre.org/data/definitions/775.html"). -Wno-analyzer-free-of-non-heap -fanalyzer -Wno-analyzer-free-of-non-heap . "free" - ( ) . CWE-590: Free of Memory not on the Heap ("https://cwe.mitre.org/data/definitions/590.html"). -Wno-analyzer-imprecise-fp-arithmetic -fanalyzer -Wno-analyzer-imprecise-fp-arithmetic . (floating-point) . . -Wno-analyzer-infinite-loop -fanalyzer -Wno-analyzer-infinite-loop . . << >> : * .IP * 4 * . : while (1) { char opcode = *cpu_state.pc; switch (opcode) { case OPCODE_FOO: handle_opcode_foo (&cpu_state); break; case OPCODE_BAR: handle_opcode_bar (&cpu_state); break; } } "opcode" "switch" "default" <> "cpu_state.pc" "opcode" . CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') ("https://cwe.mitre.org/data/definitions/835.html"). -Wno-analyzer-infinite-recursion -fanalyzer -Wno-analyzer-infinite-recursion . . <<>> . . <<>> (iteration) . . -Winfinite-recursion . CWE-674: Uncontrolled Recursion ("https://cwe.mitre.org/data/definitions/674.html"). -Wno-analyzer-jump-through-null -fanalyzer -Wno-analyzer-jump-through-null . "NULL" . -Wno-analyzer-malloc-leak -fanalyzer -Wno-analyzer-malloc-leak . : "malloc" "malloc" . CWE-401: Missing Release of Memory after Effective Lifetime ("https://cwe.mitre.org/data/definitions/401.html"). -Wno-analyzer-mismatching-deallocation -fanalyzer -Wno-analyzer-mismatching-deallocation . . "free" "delete" "delete[]" "malloc" / . CWE-762: Mismatched Memory Management Routines ("https://cwe.mitre.org/data/definitions/762.html"). -Wno-analyzer-out-of-bounds -fanalyzer -Wno-analyzer-out-of-bounds . . . (symbolic) . CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer ("https://cwe.mitre.org/data/definitions/119.html"). (text art) : ( ) . -fdiagnostics-text-art-charset=none . -Wno-analyzer-overlapping-buffers -fanalyzer -Wno-analyzer-overlapping-buffers . API (undefined) . *<"memcpy"> *<"strcat"> *<"strcpy"> . -Wno-analyzer-possible-null-argument -fanalyzer -Wno-analyzer-possible-null-argument . "NULL" "__attribute__((nonnull))" "NULL" . CWE-690: Unchecked Return Value to NULL Pointer Dereference ("https://cwe.mitre.org/data/definitions/690.html"). -Wno-analyzer-possible-null-dereference -fanalyzer -Wno-analyzer-possible-null-dereference . "NULL" . CWE-690: Unchecked Return Value to NULL Pointer Dereference ("https://cwe.mitre.org/data/definitions/690.html"). -Wno-analyzer-null-argument -fanalyzer -Wno-analyzer-null-argument . NULL "__attribute__((nonnull))" "NULL" . CWE-476: NULL Pointer Dereference ("https://cwe.mitre.org/data/definitions/476.html"). -Wno-analyzer-null-dereference -fanalyzer -Wno-analyzer-null-dereference . NULL . CWE-476: NULL Pointer Dereference ("https://cwe.mitre.org/data/definitions/476.html"). -Wno-analyzer-putenv-of-auto-var -fanalyzer -Wno-analyzer-putenv-of-auto-var . "putenv" (automatic) . POS34-C. Do not call putenv() with a pointer to an automatic variable as the argument ("https://wiki.sei.cmu.edu/confluence/x/6NYxBQ"). -Wno-analyzer-shift-count-negative -fanalyzer -Wno-analyzer-shift-count-negative . (shift) . -Wshift-count-negative C/C++ . (false negatives) ..IP -Wno-analyzer-shift-count-overflow 4 -fanalyzer -Wno-analyzer-shift-count-overflow . (shift) . -Wshift-count-overflow C/C++ . . -Wno-analyzer-stale-setjmp-buffer -fanalyzer -Wno-analyzer-stale-setjmp-buffer . "longjmp" "jmp_buf" "setjmp" . "setjmp" "jmp_buf" . "setjmp" . "longjmp" ( ) . -Wno-analyzer-tainted-allocation-size -fanalyzer -Wno-analyzer-tainted-allocation-size . . CWE-789: Memory Allocation with Excessive Size Value ("https://cwe.mitre.org/data/definitions/789.html"). -Wno-analyzer-tainted-assertion -fanalyzer -Wno-analyzer-tainted-assertion . "noreturn" ( "__builtin_unreachable") . (assertion). : assert (some_tainted_value < SOME_LIMIT); : * : * "NDEBUG" . <<>> . "noreturn" "__builtin_unreachable" . <<>> . . CWE-617: Reachable Assertion ("https://cwe.mitre.org/data/definitions/617.html"). : switch (some_tainted_value) { case 0: /* [...etc; various valid cases omitted...] */ break; default: __builtin_unreachable (); /* BUG: attacker can trigger this */ } . -Wno-analyzer-tainted-array-index -fanalyzer -Wno-analyzer-tainted-array-index . (out-of-bounds) . CWE-129: Improper Validation of Array Index ("https://cwe.mitre.org/data/definitions/129.html"). -Wno-analyzer-tainted-divisor -fanalyzer -Wno-analyzer-tainted-divisor . (modulus) . CWE-369: Divide By Zero ("https://cwe.mitre.org/data/definitions/369.html"). -Wno-analyzer-tainted-offset -fanalyzer -Wno-analyzer-tainted-offset . . CWE-823: Use of Out-of-range Pointer Offset ("https://cwe.mitre.org/data/definitions/823.html"). -Wno-analyzer-tainted-size -fanalyzer -Wno-analyzer-tainted-size . "memset" . CWE-129: Improper Validation of Array Index ("https://cwe.mitre.org/data/definitions/129.html"). -Wno-analyzer-undefined-behavior-ptrdiff -fanalyzer -Wno-analyzer-undefined-behavior-ptrdiff . . (undefined behavior) ( ) . CWE-469: Use of Pointer Subtraction to Determine Size ("https://cwe.mitre.org/data/definitions/469.html"). -Wno-analyzer-undefined-behavior-strtok -fanalyzer -Wno-analyzer-undefined-behavior-strtok . "strtok" . NULL "strtok" . -Wno-analyzer-unsafe-call-within-signal-handler -fanalyzer -Wno-analyzer-unsafe-call-within-signal-handler . (async-signal-unsafe) ( "fprintf") . CWE-479: Signal Handler Use of a Non-reentrant Function ("https://cwe.mitre.org/data/definitions/479.html"). -Wno-analyzer-use-after-free -fanalyzer -Wno-analyzer-use-after-free . : "free" "malloc" . CWE-416: Use After Free ("https://cwe.mitre.org/data/definitions/416.html"). -Wno-analyzer-use-of-pointer-in-stale-stack-frame -fanalyzer -Wno-analyzer-use-of-pointer-in-stale-stack-frame . (stale stack frame) . -Wno-analyzer-va-arg-type-mismatch -fanalyzer -Wno-analyzer-va-arg-type-mismatch . "va_arg" (variadic) . CWE-686: Function Call With Incorrect Argument Type ("https://cwe.mitre.org/data/definitions/686.html")..IP -Wno-analyzer-va-list-exhausted 4 -fanalyzer -Wno-analyzer-va-list-exhausted . "va_arg" (variadic call) "va_list" . : CWE-685: Function Call With Incorrect Number of Arguments ("https://cwe.mitre.org/data/definitions/685.html"). -Wno-analyzer-va-list-leak -fanalyzer -Wno-analyzer-va-list-leak . "va_start" "va_copy" "va_list" "va_end" . -Wno-analyzer-va-list-use-after-va-end -fanalyzer -Wno-analyzer-va-list-use-after-va-end . "va_list" "va_end" . "va_list". -Wno-analyzer-write-to-const -fanalyzer -Wno-analyzer-write-to-const . "const" . (false negatives) . -Wno-analyzer-write-to-string-literal -fanalyzer -Wno-analyzer-write-to-string-literal . (string literal) . (false negatives) . -Wno-analyzer-use-of-uninitialized-value -fanalyzer -Wno-analyzer-use-of-uninitialized-value . . : CWE-457: Use of Uninitialized Variable ("https://cwe.mitre.org/data/definitions/457.html"). (hardcoded) : *<"alloca"> *< "__builtin_alloc",> "__builtin_alloc_with_align", @item "__builtin_calloc", "__builtin_free", "__builtin_malloc", "__builtin_memcpy", "__builtin_memcpy_chk", "__builtin_memset", "__builtin_memset_chk", "__builtin_realloc", "__builtin_stack_restore" "__builtin_stack_save" *<"calloc"> *<"free"> *<"malloc"> *<"memset"> *<"operator delete"> *<"operator delete []"> *<"operator new"> *<"operator new []"> *<"realloc"> *<"strdup"> *<"strndup"> : *<"open"> *<"close"> *<"creat"> *<"dup" "dup2" "dup3"> *<"isatty"> *<"pipe" "pipe2"> *<"read"> *<"write"> *<"socket" "bind" "listen" "accept" "connect"> "": *< "__builtin_fprintf",> "__builtin_fprintf_unlocked", "__builtin_fputc", "__builtin_fputc_unlocked", "__builtin_fputs", "__builtin_fputs_unlocked", "__builtin_fwrite", "__builtin_fwrite_unlocked", "__builtin_printf", "__builtin_printf_unlocked", "__builtin_putc", "__builtin_putchar", "__builtin_putchar_unlocked", "__builtin_putc_unlocked", "__builtin_puts", "__builtin_puts_unlocked", "__builtin_vfprintf" "__builtin_vprintf" *<"fopen"> *<"fclose"> *<"ferror"> *<"fgets"> *<"fgets_unlocked"> *<"fileno"> *<"fread"> *<"getc"> *<"getchar"> *<"fprintf"> *<"printf"> *<"fwrite"> : *< "__builtin_expect",> "__builtin_expect_with_probability", "__builtin_strchr", "__builtin_strcpy", "__builtin_strcpy_chk", "__builtin_strlen", "__builtin_va_copy" "__builtin_va_start" *< GNU "error" "error_at_line"> *<"getpass"> *<"longjmp"> *<"putenv"> *<"setjmp"> *<"siglongjmp"> *<"signal"> *<"sigsetjmp"> *<"strcat"> *<"strchr"> *<"strlen"> "__analyzer_" GCC ( GCC Internals) . : *<--param analyzer-bb-explosion-factor=value> *<--param analyzer-max-enodes-per-program-point=value> *<--param analyzer-max-recursion-depth=value> *<--param analyzer-min-snodes-for-call-summary=value> : -fanalyzer-call-summaries (interprocedural analysis) . ( --param analyzer-min-snodes-for-call-summary=value). -fanalyzer-checker=name (checker) . -fanalyzer-debug-text-art-headings . . -fno-analyzer-feasibility . (feasible) : . . -fno-analyzer-feasibility . -fanalyzer-fine-grained . << >> (exploded graph) . (basic block) . -fanalyzer-fine-grained . -fanalyzer-show-duplicate-count : . -fanalyzer-show-events-in-system-headers . -fanalyzer-show-events-in-system-headers . -fno-analyzer-state-merge . << >> . -fno-analyzer-state-merge . -fno-analyzer-state-purge . . -fno-analyzer-state-purge . -fno-analyzer-suppress-followups . . : *<-Wanalyzer-null-argument> *<-Wanalyzer-null-dereference> *<-Wanalyzer-use-after-free> *<-Wanalyzer-use-of-pointer-in-stale-stack-frame> *<-Wanalyzer-use-of-uninitialized-value> -fno-analyzer-suppress-followups . -fanalyzer-transitivity (transitivity) . -fno-analyzer-undo-inlining . -fanalyzer . (function inlining) . . -fno-analyzer-undo-inlining . -fanalyzer-verbose-edges . . -fanalyzer-verbose-state-changes . . -fanalyzer-verbosity=level . level : 0 . ("free" ) "free" . 1 . 2 ( << /true>> ). . 3 . 4 . -fdump-analyzer file.analyzer.txt. -fdump-analyzer-stderr . -fdump-analyzer-stderr stderr. -fdump-analyzer . -fdump-analyzer-callgraph (call graph) GraphViz file.callgraph.dot. -fdump-analyzer-exploded-graph << >> GraphViz file.eg.dot. . -fdump-analyzer-exploded-nodes << >> ..IP -fdump-analyzer-exploded-nodes-2 4 << >> (exploded graph) file.eg.txt. -fdump-analyzer-exploded-nodes-3 << >> file.eg-id.txt. . -fdump-analyzer-exploded-paths << >> (exploded path) file.idx.kind.epath.txt. -fdump-analyzer-feasibility (feasible paths). GraphViz file.*.fg.dot file.*.tg.dot file.*.fpath.txt . -fdump-analyzer-infinite-loop . GraphViz file.*.infinite-loop.dot . -fdump-analyzer-json JSON file.analyzer.json.gz. . -fdump-analyzer-state-purge -fdump-analyzer-supergraph <<>> (supergraph) GraphViz . file.state-purge.dot . -fdump-analyzer-supergraph <<>> (supergraph) GraphViz file.supergraph.dot file.supergraph-eg.dot. . << >> . -fdump-analyzer-untracked . (Options for Debugging Your Program) GCC (debugger) -g . ( DWARF CTF) . GCC -g -O . : . . . -Og -g . -O -Og . -g (stabs COFF XCOFF DWARF). GDB . stabs -g GDB GDB (crash) . -gvms ( ). -ggdb GDB. (DWARF stabs ) GDB . -gdwarf -gdwarf-version DWARF ( ). version 2 3 4 5 5 ( VxWorks TPF Darwin / macOS 2 AIX 4 ). DWARF 2 DWARF 3 (unwind tables) . 4 GDB 7.0 -fvar-tracking-assignments . 5 GDB 8.0 . GCC DWARF 1 2 . DWARF ( -fno-dwarf2-cfi-asm) DWARF 2 DWARF . -gbtf BTF. BTF eBPF . x86 BTF DWARF . -gprune-btf -gno-prune-btf BTF . (file-scope) . BPF BPF CO-RE BPF CO-RE . struct union struct union BTF_KIND_FWD (forward declarations) . BTF . BPF BTF BPF . BTF BPF . -gctf -gctflevel CTF level CTF. -gctf level CTF 2 . CTF DWARF . 0 CTF . -gctf0 -gctf . 1 CTF (tracebacks) . (callsite) . 2 ( ) . -gvms Alpha/VMS ( ). DEBUG Alpha/VMS . -gcodeview CodeView ( ). Microsoft Visual C++ Windows . -glevel -ggdblevel -gvmslevel level . 2 . 0 . -g0 -g . 1 (backtrace) . . 3 . -g3 . -g . -gdwarf -gdwarf-level . -glevel DWARF . -fno-eliminate-unused-debug-symbols . ..IP -femit-class-debug-always 4 ++C (object file) . GCC . -fno-merge-debug-strings (linker) . . . . -fdebug-prefix-map=old=new old new . (build-time) (install-time) . . new . (reproducible builds) GDB . -ffile-prefix-map -fcanon-prefix-map . -fvar-tracking (variable tracking pass) . . ( ). (-Os -O -O2 ...) (-g) . -fvar-tracking-assignments (annotate) . -gdwarf-4 . var-tracking . -fvar-tracking (selective scheduling) . -gsplit-dwarf DWARF .dwo . . .dwo . -gdwarf32 -gdwarf64 DWARF -gdwarf32 DWARF -gdwarf64 DWARF . -gdwarf32 . DWARF DWARF . DWARF . -gdescribe-dies DIE DWARF (artificial variables) DIE (call site parameter DIEs) . -gpubnames ".debug_pubnames" ".debug_pubtypes" DWARF . -ggnu-pubnames ".debug_pubnames" ".debug_pubtypes" GDB (GDB index) . GDB . -fdebug-types-section DWARF DIE (type DIEs) ".debug_info" ".debug_types" . comdat . DWARF ".debug_types" ".debug_types" . -grecord-gcc-switches -gno-record-gcc-switches DW_AT_producer DWARF . . . -frecord-gcc-switches . -gstrict-dwarf DWARF -gdwarf-version . DWARF . -gno-strict-dwarf DWARF -gdwarf-version . -gas-loc-support ".loc" . DWARF2+ . . GCC . -gno-as-loc-support DWARF2+ GCC . -gas-locview-support "view" (reset assertion checking) ".loc" . GCC . -gno-as-locview-support -gvariable-location-views GCC (view numbers) . -gcolumn-info -gno-column-info DWARF . . -gstatement-frontiers -gno-statement-frontiers GCC (internal representation) "is_stmt" . (-Os -O1 -O2 ...) DWARF 2 . -gvariable-location-views -gvariable-location-views=incompat5 -gno-variable-location-views (progressive view numbers) . . . . DWARF 2 -fvar-tracking-assignments -gstrict-dwarf . GCC -ginternal-reset-location-views . DWARF 5 -gvariable-location-views=incompat5 . . . -ginternal-reset-location-views -gno-internal-reset-location-views . (insn length) . (GNU assembler) "view number mismatch" . ..IP -ginline-points 4 -gno-inline-points (inlined). . (statement frontiers) . -gz[=type] DWARF . type . type none ( ) zlib ( zlib ELF gABI) . . -gz . -femit-struct-debug-baseonly (struct-like) . (debugger). -femit-struct-debug-reduced . -femit-struct-debug-detailed . DWARF . -femit-struct-debug-reduced (template) . . -femit-struct-debug-baseonly . -femit-struct-debug-detailed . DWARF . -femit-struct-debug-detailed[=spec-list] . . -femit-struct-debug-reduced -femit-struct-debug-baseonly . [dir:|ind:][ord:|gen:](any|sys|base|none) . (dir:) (ind:) . . (incomplete struct) . : struct one direct; struct two * indirect;. (ord:) / (gen:) . . ++C (non-explicit specializations of template classes) . generics -femit-struct-debug-detailed . . none any . base . foo.c foo.h . sys base . . -femit-struct-debug-detailed=all . DWARF . -fno-dwarf2-cfi-asm (unwind) DWARF ".eh_frame" ".cfi_*" GAS. -fno-eliminate-unused-debug-types DWARF GCC . GCC (compilation unit) (cast) ( ) . . (Options That Control Optimization) . . : (breakpoint) (program counter) . / . . . . . -O0 -O . -Og (passes) . GCC -O . GCC -Q --help=optimizers . -O -O1 . . -O . -O -O . -O : -fauto-inc-dec -fbranch-count-reg -fcombine-stack-adjustments -fcompare-elim -fcprop-registers -fdce -fdefer-pop -fdelayed-branch -fdse -fforward-propagate -fguess-branch-probability -fif-conversion -fif-conversion2 -finline-functions-called-once -fipa-modref -fipa-profile -fipa-pure-const -fipa-reference -fipa-reference-addressable -fivopts -fmerge-constants -fmove-loop-invariants -fmove-loop-stores -fomit-frame-pointer -freorder-blocks -fshrink-wrap -fshrink-wrap-separate -fsplit-wide-types -fssa-backprop -fssa-phiopt -ftree-bit-ccp -ftree-ccp -ftree-ch -ftree-coalesce-vars -ftree-copy-prop -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-phiprop -ftree-pta -ftree-scev-cprop -ftree-sink -ftree-slsr -ftree-sra -ftree-ter -funit-at-a-time.IP -O2 4 . GCC . -O . -O2 -O1 . : -falign-functions -falign-jumps -falign-labels -falign-loops -fcaller-saves -fcode-hoisting -fcrossjumping -fcse-follow-jumps -fcse-skip-blocks -fdelete-null-pointer-checks -fdevirtualize -fdevirtualize-speculatively -fexpensive-optimizations -ffinite-loops -fgcse -fgcse-lm -fhoist-adjacent-loads -finline-functions -finline-small-functions -findirect-inlining -fipa-bit-cp -fipa-cp -fipa-icf -fipa-ra -fipa-sra -fipa-vrp -fisolate-erroneous-paths-dereference -flra-remat -foptimize-crc -foptimize-sibling-calls -foptimize-strlen -fpartial-inlining -fpeephole2 -freorder-blocks-algorithm=stc -freorder-blocks-and-partition -freorder-functions -frerun-cse-after-loop -fschedule-insns -fschedule-insns2 -fsched-interblock -fsched-spec -fstore-merging -fstrict-aliasing -fthread-jumps -ftree-builtin-call-dce -ftree-loop-vectorize -ftree-pre -ftree-slp-vectorize -ftree-switch-conversion -ftree-tail-merge -ftree-vrp -fvect-cost-model=very-cheap -fgcse -O2 goto (computed gotos) . -O3 . -O3 -O2 : -fgcse-after-reload -fipa-cp-clone -floop-interchange -floop-unroll-and-jam -fpeel-loops -fpredictive-commoning -fsplit-loops -fsplit-paths -ftree-loop-distribution -ftree-partial-pre -funswitch-loops -fvect-cost-model=dynamic -fversion-loops-for-strides -O0 . . -O0 GCC -Q --help=optimizers . GCC (canonicalization) -O . -Os ( ). -Os -O2 : -falign-functions -falign-jumps -falign-labels -falign-loops -fprefetch-loop-arrays -freorder-blocks-algorithm=stc -finline-functions . -Ofast . -Ofast -O3 . . -ffast-math -fallow-store-data-races -fstack-arrays ( -fmax-stack-var-size ) -fno-protect-parens . -fsemantic-interposition . -Og . -Og -- . -O0 -O0 . -O0 -Og . -Og -O1 : -fbranch-count-reg -fdelayed-branch -fdse -fif-conversion -fif-conversion2 -finline-functions-called-once -fmove-loop-invariants -fmove-loop-stores -fssa-phiopt -ftree-bit-ccp -ftree-dse -ftree-pta -ftree-sra -Oz . . -Oz -Os -O2. -O . -fflag . -ffoo -fno-foo . --- . no- . . -O . << >> (fine-tuning) . -fno-defer-pop (pop ) . -O1 -fdefer-pop . -fforward-propagate (forward propagation) RTL. . (loop unrolling) . -O1 -O2 -O3 -Os . -favoid-store-forwarding -fno-avoid-store-forwarding CPU (load) (stores) (stall ). . . -ffp-contract=style -ffp-contract=off (floating-point expression contraction) . -ffp-contract=fast (fused multiply-add) . -ffp-contract=on . C C++ . C (-std=c11 ) -ffp-contract=off -ffp-contract=fast . -fomit-frame-pointer (frame pointer) . (register) . . -fno-omit-frame-pointer . (leaf functions) . -O1 . -foptimize-crc CRC ( ) . CRC . CRC CRC CRC . (carry-less-multiplication) CRC CRC . -O2 ..IP -foptimize-sibling-calls 4 (sibling) (tail recursive). -O2 -O3 -Os . -foptimize-strlen C ( "strlen" "strchr" "strcpy") "_FORTIFY_SOURCE" . -O2 -O3 . -finline-stringops[=fn] (inline) ( "memset") . -ffreestanding -fno-builtin . (alignment) (code caches) . . -fno-inline "always_inline" . . "noinline" . -finline-small-functions ( ). . inline . -O2 -O3 -Os . -findirect-inlining . -finline-functions -finline-small-functions . -O2 -O3 -Os . -finline-functions inline . . "static" . -O2 -O3 -Os . -fprofile-use -fauto-profile . -finline-functions-called-once "static" "inline" . . -O1 -O2 -O3 -Os -Og . -fearly-inlining "always_inline" -fprofile-generate . . . -fipa-sra (interprocedural scalar replacement of aggregates) (by reference) (by value). -O2 -O3 -Os . -finline-limit=n GCC . . n (pseudo instructions) . --param name=value . -finline-limit=n : max-inline-insns-single n/2 . max-inline-insns-auto n/2 . . : -finline-limit . : . . -fno-keep-inline-dllexport -fkeep-inline-functions "dllexport" declspec . -fkeep-inline-functions C "static" "inline" (object file) . "extern inline" GNU C90 . C++ . -fkeep-static-functions "static" . -fkeep-static-consts "static const" . GCC . -fno-keep-static-consts . -fmerge-constants ( ) (compilation units). (linker) . -fno-merge-constants . -O1 -O2 -O3 -Os . -fmerge-all-constants . -fmerge-constants . -fmerge-constants . C C++ (non-conforming) . -fmodulo-sched (swing modulo scheduling) . . -fmodulo-sched-allow-regmoves SMS (register moves). (anti- dependences) reg-move (life-range analysis) . -fmodulo-sched . -fno-branch-count-reg << >> (decrement and branch) . x86 PowerPC IA-64 S/390. -fno-branch-count-reg . -O1 -Og -fbranch-count-reg . -fno-function-cse . . -ffunction-cse . -fno-zero-initialized-in-bss BSS GCC BSS . . (data section) --- / . -fzero-initialized-in-bss Ada..IP -fthread-jumps 4 . . -O1 -O2 -O3 -Os . -fsplit-wide-types "long long" - . . -O1 -O2 -O3 -Os . -fsplit-wide-types-early . -fsplit-wide-types . . -fcse-follow-jumps (CSE) . CSE "if" "else" CSE . -O2 -O3 -Os . -fcse-skip-blocks -fcse-follow-jumps CSE . CSE "if" else -fcse-skip-blocks CSE "if" . -O2 -O3 -Os . -frerun-cse-after-loop . -O2 -O3 -Os . -fgcse . . : computed goto ( GCC) -fno-gcse . -O2 -O3 -Os . -fgcse-lm -fgcse-lm . / / . -fgcse . -fgcse-sm -fgcse-sm (store motion) . . -fgcse-lm / . . -fgcse-las -fgcse-las ( ) . . -fgcse-after-reload -fgcse-after-reload reload . (spilling) . -O3 -fprofile-use -fauto-profile . -faggressive-loop-optimizations . (undefined behavior) . (loop unrolling) (loop peeling) . . -funconstrained-commons ( Fortran) . . -fcrossjumping (cross-jumping) . . . -O2 -O3 -Os . -fauto-inc-dec . . -O1 . -fdce (DCE) RTL . -O1 . -fdse (DSE) RTL . -O1 . -fif-conversion (branch-less) . (conditional moves) min max abs . -fif-conversion2 . -O1 -O2 -O3 -Os -Og. -fif-conversion2 ( ) . -O1 -O2 -O3 -Os -Og. -fdeclone-ctor-dtor C++ ABI : operator delete . (clone) . thunk . -Os . -fdelete-null-pointer-checks (null pointers) (dereference) . (constant folding) . GCC (trap) . . -fno-delete-null-pointer-checks . . AVR MSP430 . . -fdevirtualize . (-findirect-inlining) (-fipa-cp) . -O2 -O3 -Os . -fdevirtualize-speculatively (speculative) . . . (inlining) . . -fdevirtualize-at-ltrans (devirtualization) (stream) . . . -fexpensive-optimizations . -O2 -O3 -Os ..IP -free 4 (extension) . x86-64 - - . Alpha AArch64 LoongArch PowerPC RISC-V SPARC h83000 x86 -O2 -O3 -Os . -fno-lifetime-dse ++C (lifetime) : (constructor) (dead) . (dead store elimination) . ( operator new ) (destructor) -flifetime-dse=1 . -flifetime-dse=2 . -flifetime-dse=0 -fno-lifetime-dse . -flive-range-shrinkage (register pressure) (register live range shrinkage). . -fira-algorithm=algorithm (IRA). algorithm priority Chow CB Chaitin-Briggs . Chaitin-Briggs . -fira-region=region . region : all . / . mixed . (-O -O2 ...) . one . -Os -O0 . -fira-hoist-pressure IRA (code hoisting pass) . . -Os . -fira-loop-pressure IRA (loop invariants). (>= ) . -O3 . -fno-ira-share-save-slots (stack slots) (call-used) . . -fno-ira-share-spill-slots . . -flra-remat (rematerialization) (CFG) LRA. (spilled) LRA ( ) . -O2 -O3 -Os . -fdelayed-branch (delayed branch) . -O1 -O2 -O3 -Os -Og . -fschedule-insns (execution stalls) . . -O2 -O3 . . x86 AArch64 -O3 . -fschedule-insns2 -fschedule-insns . . -O2 -O3 -Os . -fno-sched-interblock (basic blocks) -fschedule-insns -O2 . -fno-sched-spec (speculative motion) -fschedule-insns -O2 . -fsched-pressure . -fschedule-insns -O2 . . -fsched-spec-load . -fschedule-insns -O2 . -fsched-spec-load-dangerous . -fschedule-insns -O2 . -fsched-stalled-insns -fsched-stalled-insns=n ( ) . -fno-sched-stalled-insns -fsched-stalled-insns=0 . -fsched-stalled-insns -fsched-stalled-insns=1 . -fsched-stalled-insns-dep -fsched-stalled-insns-dep=n () . -fsched-stalled-insns . -fno-sched-stalled-insns-dep -fsched-stalled-insns-dep=0 . -fsched-stalled-insns-dep -fsched-stalled-insns-dep=1 . -fsched2-use-superblocks (superblock) . . GCC . -fschedule-insns2 -O2 . -fsched-group-heuristic . . -fschedule-insns -fschedule-insns2 -O2 . -fsched-critical-path-heuristic . . -fschedule-insns -fschedule-insns2 -O2 . -fsched-spec-insn-heuristic . . -fschedule-insns -fschedule-insns2 -O2 ..IP -fsched-rank-heuristic 4 (rank heuristic) . . -fschedule-insns -fschedule-insns2 -O2 . -fsched-last-insn-heuristic (last-instruction heuristic) . . -fschedule-insns -fschedule-insns2 -O2 . -fsched-dep-count-heuristic (dependent-count heuristic) . . -fschedule-insns -fschedule-insns2 -O2 . -freschedule-modulo-scheduled-loops (Modulo scheduling) . . . -fselective-scheduling (selective scheduling). . -fselective-scheduling2 . . -fsel-sched-pipelining (software pipelining) . -fselective-scheduling -fselective-scheduling2 . -fsel-sched-pipelining-outer-loops . -fsel-sched-pipelining . -fsemantic-interposition ELF (interposition) . DSO . . -fno-semantic-interposition ( ) . . inline ( ) weak . -fshrink-wrap (function prologues) . -O . -fshrink-wrap-separate (Shrink-wrap) . -fshrink-wrap . -fcaller-saves . . (call-preserved) . -O2 -O3 -Os . -fcombine-stack-adjustments (push pop) . -O1 . -fipa-ra caller-save . . . -O2 -O3 -Os (-p -pg) ( RTL ) . -fconserve-stack . . large-stack-frame 100 large-stack-frame-growth 400 . -ftree-reassoc (reassociation) . -O1 . -fcode-hoisting (code hoisting). . . -O2 . -ftree-pre (PRE) . -O2 -O3 . -ftree-partial-pre (PRE). -O3 . -ftree-forwprop (forward propagation) . -O1 . -ftree-fre (FRE) . FRE PRE FRE . PRE . -O1 . -ftree-phiprop . -O1 . -fhoist-adjacent-loads if-then-else (conditional move) . -O2 . -ftree-copy-prop (copy propagation) . . -O1 . -fipa-pure-const (pure) (constant) . -O1 . -fipa-reference . -O1 . -fipa-reference-addressable . -O1 . -fipa-reorder-for-locality . -freorder-functions /// . -fprofile-reorder-functions . -flto-partition= . . -fipa-stack-alignment . . -fipa-pta . . . -fipa-profile . . ( "cold" "noreturn" ) . . -O1 . -fipa-modref mod/ref. ( ) . -O1 ..IP -fipa-cp 4 (interprocedural constant propagation) . . . -O2 -Os -O3 . -fprofile-use -fauto-profile . -fipa-cp-clone (function cloning) . . (: --param ipa-cp-unit-growth=value). -O3 . -fprofile-use -fauto-profile . -fipa-bit-cp . -O2 -fprofile-use -fauto-profile . -fipa-cp . -fipa-vrp (value ranges) . -O2 . -fipa-cp . -fipa-icf (Identical Code Folding) . (unwind stacks) . . ICF Gold ICF GCC - GCC Gold . -O2 -Os . -flate-combine-instructions . . . (targets) -O2 -Os . -flive-patching=level GCC (live-patching) . / << >> . . . (inlining) / (pureness/constness) . IPA . IPA . level : inline-clone . . -flive-patching=inline-clone : -fwhole-program -fipa-pta -fipa-reference -fipa-ra -fipa-icf -fipa-icf-functions -fipa-icf-variables -fipa-bit-cp -fipa-vrp -fipa-pure-const -fipa-reference-addressable -fipa-stack-alignment -fipa-modref inline-only-static (static) . . -flive-patching=inline-clone -flive-patching=inline-only-static : -fipa-cp-clone -fipa-sra -fpartial-inlining -fipa-cp -flive-patching inline-clone . . -flive-patching (-flto) . -fisolate-erroneous-paths-dereference (null pointer) . (trap) . -O2 -fdelete-null-pointer-checks . -fisolate-erroneous-paths-attribute "returns_nonnull" "nonnull" . (trap) . -O2 . -ftree-sink (forward store motion) . -O1 . -ftree-bit-ccp . -O1 -Og . -ftree-ccp . -ftree-ccp (CCP) . -O1 . -fssa-backprop . . -O1 . -fssa-phiopt SSA PHI . -O1 -Og . -ftree-switch-conversion switch . -O2 . -ftree-tail-merge . . (tail merging) (cross jumping) . -O2 . max-tail-merge-comparisons max-tail-merge-iterations . -ftree-cselim . -O1 (conditional move) . -ftree-dce (DCE) . -O1 . -ftree-builtin-call-dce (DCE) (built-in) "errno" . -Os -O2 . -ffinite-loops . . -O2 ++C -std=c++11 . -ftree-dominator-opts ( / ) (dominator tree) . (jump threading ) . -O1 . -ftree-dse (DSE) . . . -O1 . -ftree-ch (loop header copying) . . . -O1 . -Os ..IP -ftree-loop-optimize 4 . -O1 . -ftree-loop-linear -floop-strip-mine -floop-block . -floop-nest-optimize . GCC --with-isl Graphite . -fgraphite-identity graphite . SCoP (polyhedral representation) gimple . -fgraphite-identity GIMPLE -> GRAPHITE -> GIMPLE . isl . -floop-nest-optimize isl . Pluto . (data-locality) . . -floop-parallelize-all Graphite . (loop carried dependences) . -ftree-coalesce-vars SSA . -fno-var-tracking-assignments . SSA . . -ftree-loop-if-convert . (vectorization pass) . . -ftree-loop-distribution . (cache) . DO I = 1, N A(I) = B(I) + C D(I) = E(I) * F ENDDO DO I = 1, N A(I) = B(I) + C ENDDO DO I = 1, N D(I) = E(I) * F ENDDO -O3 . -fprofile-use -fauto-profile . -ftree-loop-distribute-patterns . -O2 -fprofile-use -fauto-profile . memset . DO I = 1, N A(I) = 0 B(I) = A(I) + I ENDDO DO I = 1, N A(I) = 0 ENDDO DO I = 1, N B(I) = A(I) + I ENDDO memset . -floop-interchange graphite . . for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) for (int k = 0; k < N; k++) c[i][j] = c[i][j] + a[i][k]*b[k][j]; for (int i = 0; i < N; i++) for (int k = 0; k < N; k++) for (int j = 0; j < N; j++) c[i][j] = c[i][j] + a[i][k]*b[k][j]; -O3 . -fprofile-use -fauto-profile . -floop-unroll-and-jam (unroll and jam) . . -O3 . -fprofile-use -fauto-profile . -ftree-loop-im (loop invariant motion) . RTL ( ). -funswitch-loops . (store motion) . -ftree-loop-ivcanon . . . -ftree-scev-cprop . . . -O1 . -fivopts ( ) . -O1 . -ftree-parallelize-loops=n n . . (CPU-intensive) . -pthread -pthread . -ftree-pta (points-to analysis) . -O1 -Og. -ftree-sra (scalar replacement of aggregates) . . -O1 -Og . -fstore-merging . (immediate values) (word) . -O2 -Os . -ftree-ter SSA->normal . / . -GIMPLE RTL . -O1 . -ftree-slsr (straight-line strength reduction) . . -O1 ..IP -ftree-vectorize 4 . -ftree-loop-vectorize -ftree-slp-vectorize . -ftree-loop-vectorize . -O2 -ftree-vectorize -fprofile-use -fauto-profile . -ftree-slp-vectorize . -O2 -ftree-vectorize -fprofile-use -fauto-profile . -ftrivial-auto-var-init=choice . GCC -Wuninitialized -Wanalyzer-use-of-uninitialized-value . GCC (padding) . case "switch" . -Wtrivial-auto-var-init . choice : * uninitialized . C ++C . * pattern (crash) (crash dump) . "0xFE" . . * zero . uninitialized . zero pattern ( ) . hardbool . () "range 160..400" choice 0x00 0xFE . hardbool "0X5A" 0xA5 "false" "true" choice (trap) zero "false" "static" . . () pattern "false" () . "uninitialized" . -fvect-cost-model=model . model unlimited dynamic cheap very-cheap . unlimited dynamic . cheap ( ) dynamic . very-cheap (epilogue loops) cheap . dynamic cheap. -fsimd-cost-model=model simd OpenMP . model unlimited dynamic cheap . model -fvect-cost-model -fvect-cost-model . -ftree-vrp (Value Range Propagation) . . (null pointer) . -O2 . -fdelete-null-pointer-checks . -fsplit-paths (loop backedges) . . -O3 . -fsplit-ivs-in-unroller . . -fweb CSE . . CSE . . -fvariable-expansion-in-unroller . PowerPC . -fpartial-inlining (inline) . -finline-functions -finline-small-functions . -O2 -O3 -Os . -fpredictive-commoning predictive commoning ( ) . -O3 . -fprofile-use -fauto-profile . -fprefetch-loop-arrays (prefetch) . . -Os . -fno-printf-return-value "sprintf" "snprintf" "vsprintf" "vsnprintf" ( "printf" "fprintf") . GCC ( ) . -fprintf-return-value "i" "if" ( "snprint") . char buf[9]; if (snprintf (buf, "%08x", i) >= sizeof buf) ... -fprintf-return-value -O2 . -Wformat-overflow -Wformat-truncation . -fprintf-return-value . -fno-peephole -fno-peephole2 peephole . -fno-peephole -fno-peephole2 . -fpeephole . -fpeephole2 -O2 -O3 -Os . -fno-guess-branch-probability . (-fprofile-arcs) GCC . . "__builtin_expect" "__builtin_expect" . "__builtin_expect" "__builtin_expect" . "__builtin_expect_with_probability" . -O -O2 -O3 -Os -fguess-branch-probability ..IP -freorder-blocks 4 . -O1 -O2 -O3 -Os . -freorder-blocks-algorithm=algorithm . algorithm simple ( ) stc <> . -O1 -Os simple -O2 -O3 stc. -freorder-blocks-and-partition (hot) (cold) .o (paging) (cache locality) . unwind ( setjump/longjump ) linkonce . -fsplit-stack ( ) ( ). x86 -O2 -O3 -Os . -freorder-functions . -fipa-reorder-for-locality (hot/normal/cold/never-executed) . ".text.hot" ".text.unlikely" . . (profile feedback) ( -fprofile-arcs ) "hot" "cold" . -O2 -O3 -Os . -fstrict-aliasing (aliasing) . C ( ++C) . . "unsigned int" "int" "void*" "double". . : union a_union { int i; double d; }; int f() { union a_union t; t.d = 3.0; return t.i; } union ( <>) . -fstrict-aliasing type-punning union . . : int f() { union a_union t; int* ip; t.d = 3.0; ip = &t.i; return *ip; } union : int f() { double d = 3.0; return ((union a_union *) &d)->i; } -fstrict-aliasing -O2 -O3 -Os . -fipa-strict-aliasing -fstrict-aliasing . (inline) . -fipa-strict-aliasing -fstrict-aliasing . -falign-functions -falign-functions=n -falign-functions=n:m -falign-functions=n:m:n2 -falign-functions=n:m:n2:m2 n m-1 . m n- . . -fmin-function-alignment . m n . : -falign-functions=32 -falign-functions=24 -falign-functions=32:7 . n2:m2 : -falign-functions=64:7:32:3 . m2 n2 . n . -fno-align-functions -falign-functions=1 . n . n . -O2 -O3 . -flimit-function-alignment . -falign-functions . -falign-labels -falign-labels=n -falign-labels=n:m -falign-labels=n:m:n2 -falign-labels=n:m:n2:m2 . -falign-functions . -fno-align-labels -falign-labels=1 . -falign-loops -falign-jumps . n 1 . n . -O2 -O3 . -falign-loops -falign-loops=n -falign-loops=n:m -falign-loops=n:m:n2 -falign-loops=n:m:n2:m2 . (dummy padding) . . -falign-labels . -falign-functions . -fno-align-loops -falign-loops=1 . n . n . -O2 -O3 ..IP -falign-jumps 4 -falign-jumps=n -falign-jumps=n:m -falign-jumps=n:m:n2 -falign-jumps=n:m:n2:m2 . (dummy) . (cold) . -falign-labels . -falign-functions . -fno-align-jumps -falign-jumps=1 . n . n 65536 . -O2 -O3 . -fmin-function-alignment n . -falign-functions ( ) . -flimit-function-alignment . -fno-allocation-dce ++C ( "new" "delete") (dead code elimination) . -fmalloc-dce. -fallow-store-data-races (data race) . . . -fallow-store-data-races hoisting if-conversion . . (vectorization) if-conversion . -Ofast . -funit-at-a-time . -funit-at-a-time -fno-unit-at-a-time -fno-toplevel-reorder -fno-section-anchors . . -fno-toplevel-reorder (top-level) "asm" . . (static) . . (attributes) . -ftoplevel-reorder -O1 -O0 -fsection-anchors . -fno-toplevel-reorder -fno-section-anchors . -funreachable-traps "__builtin_unreachable" (traps) . . -fsanitize=unreachable -fsanitize-trap=unreachable . -fsanitize=unreachable . -O0 -Og . -fweb (webs) () . CSE . << >> (home register) . -funroll-loops . -fwhole-program . "main" "externally_visible" (static) . -flto . . ( -flto -flinker-output=nolto-rel) . -flto[=n] . GIMPLE ( GCC) ELF (object file) . ELF . -flto . . : gcc -c -O2 -flto foo.c gcc -c -O2 -flto bar.c gcc -o myprog -flto -O2 foo.o bar.o GCC GIMPLE ELF foo.o bar.o . GIMPLE foo.o bar.o . foo.o bar.o GCC . (inliner) bar.o foo.o . ( ) : gcc -o myprog -flto -O2 foo.c bar.c foo.c bar.c GIMPLE myprog . GCC . -flto GCC . -fno-lto . . (runtime) . ( -fuse-linker-plugin) . -fwhole-program . -flto -fuse-linker-plugin GIMPLE ( -ffat-lto-objects). LTO -fno-lto . -fno-fat-lto-objects LTO . GCC . GIMPLE . GCC LTO . GCC . -O GCC . . . . GCC . : -fcommon -fexceptions -fnon-call-exceptions -fgnu-tm -m. -fPIC -fpic -fpie -fPIE : B<-fPIC> + B<-fpic> = B<-fpic> B<-fPIC> + B<-fno-pic> = B<-fno-pic> B<-fpic/-fPIC> + (no option) = (no option) B<-fPIC> + B<-fPIE> = B<-fPIE> B<-fpic> + B<-fPIE> = B<-fpie> B<-fPIC/-fpic> + B<-fpie> = B<-fpie> ABI . -freg-struct-return -fpcc-struct-return . -ffp-contract -fno-strict-overflow -fwrapv -fno-trapv -fno-strict-aliasing . -fno-strict-overflow -fwrapv -fno-trapv -ffp-contract=off -ffp-contract=fast . . -Wstringop-overflow . . . -Wa -Xassembler -fno-lto . LTO . -g . . dwarf -gdwarf-5 . LTO C ( ISO C99 6.2.7) . . . LTO : gcc -c -flto foo.c g++ -c -flto bar.cc gfortran -c -flto baz.f90 g++ -o myprog -flto -O3 foo.o bar.o baz.o -lgfortran g++ ++C -lgfortran Fortran . LTO ( LTO) . GIMPLE libfoo.a LTO . LTO gcc-ar gcc-ranlib ar ranlib GIMPLE gcc-nm . ar ranlib nm . -fuse-linker-plugin LTO : gcc -o myprog -O2 -flto -fuse-linker-plugin a.o b.o -lfoo GIMPLE libfoo.a GCC GIMPLE . / libfoo.a LTO . LTO -flto -ffat-lto-objects . . -flto -fwhole-program . ( -fuse-linker-plugin) -fwhole-program . LTO (portable) . GCC GCC . ELF DWARF . n n make . MAKE . -flto=jobserver (job server) GNU make . Makefile GCC . + Makefile . MAKE GNU make . GCC GNU make . -flto=auto GNU make ( ) ..IP -flto-partition=alg 4 (partitioning) (link-time optimizer) . 1to1 balanced ( ) max cache LTO . none (streaming) . balanced . 1to1 max . one none WPA . -flto-incremental=path LTO (cache) . - LTO . LTO (-flto) LTO . . GCC . -flto-incremental-cache-size=n LTO . . -flto-compression-level=n LTO LTO (-flto) . GCC LTO . zstd 0 ( ) 19 ( ) zlib 0 9 . . . -fuse-linker-plugin (linker plugin) . gold GNU ld 2.21 . GIMPLE . . ( -LTO ) . ( ) -fwhole-program . -flto . LTO GCC GCC (GNU ld 2.21 gold) . -ffat-lto-objects Fat LTO . LTO . -flto . -fno-fat-lto-objects LTO LTO . . nm ar ranlib ( ) . GCC gcc-ar gcc-nm gcc-ranlib . LTO fat makefile . binutils . $libdir/bfd-plugins (gcc-ar gcc-nm gcc-ranlib) . -fno-fat-lto-objects . -fcompare-elim (register allocation) . . . -O1 -O2 -O3 -Os . -ffold-mem-offsets -fno-fold-mem-offsets (add) / . -O2 -O3 . -fcprop-registers (copy-propagation) . -O1 -O2 -O3 -Os . -fprofile-correction . GCC . GCC . -fauto-profile . -fprofile-partial-training "-fprofile-use" . . ( .) "-fprofile-partial-training" . . -fprofile-use -fprofile-use=path : -fbranch-probabilities -fprofile-values -funroll-loops -fpeel-loops -ftracer -fvpt -finline-functions -fipa-cp -fipa-cp-clone -fipa-bit-cp -fpredictive-commoning -fsplit-loops -funswitch-loops -fgcse-after-reload -ftree-loop-vectorize -ftree-slp-vectorize -fvect-cost-model=dynamic -ftree-loop-distribute-patterns -fprofile-reorder-functions . GCC . -Wno-error=coverage-mismatch . . GCC (-Wmissing-profile ). path GCC path . -fprofile-dir . -fauto-profile -fauto-profile=path : -fbranch-probabilities -fprofile-values -funroll-loops -fpeel-loops -ftracer -fvpt -finline-functions -fipa-cp -fipa-cp-clone -fipa-bit-cp -fpredictive-commoning -fsplit-loops -funswitch-loops -fgcse-after-reload -ftree-loop-vectorize -ftree-slp-vectorize -fvect-cost-model=dynamic -ftree-loop-distribute-patterns -fprofile-correction path AutoFDO . fbdata.afdo . AutoFDO perf GNU/Linux . . : perf record -e br_inst_retired:near_taken -b -o perf.data \ -- your_program create_gcov GCC . unstripped . . : create_gcov --binary=your_program.unstripped --profile=perf.data \ --gcov=profile.afdo . . . -fexcess-precision=style (excess precision) IEEE . x87 x86 IEEE . C C++ IEEE . -fexcess-precision=fast . C C++ -fexcess-precision=standard ISO C99 C++ (casts) ( -ffloat-store ). C C++ -std=c99 -std=c++17 . -ffast-math -fexcess-precision=fast . -fexcess-precision=16 "_Float16" "__bf16" . -fexcess-precision=standard C C++ . x86 -mfpmath=sse -mfpmath=sse+387 IEEE . -ffloat-store . -fexcess-precision=standard . -ffloat-store -ffloat-store -fexcess-precision=standard IEEE . -ffast-math -fno-math-errno -funsafe-math-optimizations -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fcx-limited-range -fexcess-precision=fast . "__FAST_MATH__" . -O -Ofast / IEEE ISO . . -fno-math-errno ( "sqrt") "errno" . IEEE IEEE . -O -Ofast / IEEE ISO . . -fmath-errno . Darwin "errno" . -fno-math-errno . -funsafe-math-optimizations () () IEEE ANSI . FPU . -O -Ofast / IEEE ISO . . -fno-signed-zeros -fno-trapping-math -fassociative-math -freciprocal-math . -fno-unsafe-math-optimizations . -fassociative-math (re-association) . ISO C C++ . : NaN ( "(x + 2**52) - 2**52"). . -fno-signed-zeros -fno-trapping-math . -frounding-math . Fortran -fno-signed-zeros -fno-trapping-math . -fno-associative-math . -freciprocal-math . "x / y" "x * (1/y)" "(1/y)" . (flops) . -fno-reciprocal-math . -ffinite-math-only NaN +-Inf . -O -Ofast / IEEE ISO . . -fno-finite-math-only . -fno-signed-zeros . IEEE +0.0 -0.0 x+0.0 0.0*x ( -ffinite-math-only). . -fsigned-zeros . -fno-trapping-math (user-visible traps) . . -fno-signaling-nans . <> IEEE . -O -Ofast / IEEE ISO . -ftrapping-math . GCC "FENV_ACCESS" C99 . -frounding-math "FENV_ACCESS" . -frounding-math ( round-to-nearest) . FP . (constant folding) ( ) . -fno-rounding-math . GCC . GCC "FENV_ACCESS" C99 . -ftrapping-math "FENV_ACCESS" . -fsignaling-nans signaling NaN IEEE . signaling NaN . -ftrapping-math . "__SUPPORT_SNAN__" . -fno-signaling-nans . GCC signaling NaN . -fno-fp-int-builtin-inexact (built-in) "ceil" "floor" "round" "trunc" "float" "long double" <> () . ISO C99 C11 <> ISO/IEC TS 18661-1:2014 ( C IEEE 754-2008) ISO C23 . -ffp-int-builtin-inexact C23 C . -ftrapping-math . -fno-fp-int-builtin-inexact TS 18661 <> ..IP -fsingle-precision-constant 4 (single precision) (double precision). -fcx-limited-range . "NaN + I*NaN" . -fno-cx-limited-range -ffast-math . "CX_LIMITED_RANGE" ISO C99 . . -fcx-fortran-rules Fortran . "NaN + I*NaN" . -fno-cx-fortran-rules . -O . . -fbranch-probabilities -fprofile-arcs -fbranch-probabilities . -fprofile-arcs sourcename.gcda . . -fprofile-arcs . -fbranch-probabilities GCC REG_BR_PROB JUMP_INSN CALL_INSN . . : reorg.cc REG_BR_PROB . -fprofile-use -fauto-profile . -fprofile-values -fprofile-arcs . -fbranch-probabilities . -fprofile-generate -fprofile-use -fauto-profile . -fprofile-reorder-functions (profile instrumentation) (text segments) . -fprofile-use . -fvpt -fprofile-arcs . -fbranch-probabilities . . -fprofile-use -fauto-profile . -frename-registers (false dependencies) . . << >> (home register) . -funroll-loops . -fschedule-fusion . -O2 -O3 -Os . -ftracer (tail duplication) (superblock) . . -fprofile-use -fauto-profile . -funroll-loops (unroll) . -funroll-loops -frerun-cse-after-loop -fweb -frename-registers . ( ) . . -fprofile-use -fauto-profile . -funroll-all-loops . . -funroll-all-loops -funroll-loops . -fpeel-loops (peel) ( ) . ( ) . -O3 -fprofile-use -fauto-profile . -fmalloc-dce "malloc" ( "calloc" "strdup") "free" "NULL" . -fmalloc-dce=1 "free" -fmalloc-dce=2 "NULL" . -fmalloc-dce=2 . -fallocation-dce . -fmove-loop-invariants RTL . -O1 -Og . -fmove-loop-stores GIMPLE . . -ftree-loop-im . -O1 -Og . -fsplit-loops ('true') . -fprofile-use -fauto-profile . -funswitch-loops ( ). -fprofile-use -fauto-profile . -fversion-loops-for-strides (stride) . : for (int i = 0; i < n; ++i) x[i * stride] = ...; : if (stride == 1) for (int i = 0; i < n; ++i) x[i] = ...; else for (int i = 0; i < n; ++i) x[i * stride] = ...; assumed-shape Fortran ( ) (vectorization) . -O3 . -fprofile-use -fauto-profile . -ffunction-sections -fdata-sections (section) . . (linker) . ELF . AIX (CSECT) . . ( --gc-sections ) ( strip ) . ELF/DWARF . . . . . . (relaxation) ..IP -fstdarg-opt 4 (prologue) (variadic) . -fsection-anchors <<>> (anchor) . GOT GOT . "foo": static int a, b, c; int foo (void) { return a + b + c; } -fsection-anchors . ( C ): int foo (void) { register int *xr = &x; return xr[&a - &x] + xr[&b - &x] + xr[&c - &x]; } . -fzero-call-used-regs=choice call-used (ROP) . choice "zero_call_used_regs" . skip . "zero_call_used_regs" . --param name=value GCC . GCC (inline) . --param . . --help=param -Q . value . name : phiopt-factor-max-stmts-live if/then/else . predictable-branch-outcome ( ) . max-rtl-if-conversion-insns RTL . (if-conversion) . (heuristics) . file-cache-files (file cache). -Wmisleading-indentation . file-cache-lines . 0 . -Wmisleading-indentation . max-rtl-if-conversion-predictable-cost RTL . if-conversion . seq_cost GCC . BRANCH_COST . max-crossjump-edges cross-jumping. -fcrossjumping O(N^2) . . min-crossjump-insns cross-jumping . . max-grow-copy-bb-insns (basic blocks) . . max-goto-duplication-insns goto . O(N^2) GCC (unfactor). max-goto-duplication-insns . max-delay-slot-insn-search (delay slot) . . . max-delay-slot-live-search delay slot (live register) . . delay slot (control-flow graph) . max-gcse-memory "kB" (GCSE) . . max-gcse-insertion-ratio RTL PRE . max-pending-list-length . . max-modulo-backtrack-attempts (backtrack) (modulo scheduling) . . max-inline-functions-called-once-loop-depth ( ) . max-inline-functions-called-once-insns . max-inline-insns-single (tree inliner) GCC . ( GCC) . inline (C++) . max-inline-insns-auto -finline-functions ( -O3) . () inline (--param max-inline-insns-auto). max-inline-insns-small -finline-small-functions . max-inline-insns-size . . uninlined-function-insns (prologue) (epilogue) . uninlined-function-time . inline-heuristics-hint-percent ( ) inline-insns-single inline-insns-single-O2 inline-insns-auto ( )..IP uninlined-thunk-insns 4 uninlined-thunk-time --param uninlined-function-insns --param uninlined-function-time thunk . inline-min-speedup (caller) + (callee) ( ) --param max-inline-insns-single --param max-inline-insns-auto . large-function-insns . --param large-function-growth . (back end) . large-function-growth . 100 2.0 . large-unit-insns . --param inline-unit-growth . . A inline B A . B A 300\% . . --param inline-unit-growth --param large-unit-insns . lazy-modules C++ . inline-unit-growth . 20 1.2 . ( ) . ipa-cp-unit-growth (interprocedural constant propagation) . 10 1.1 . ipa-cp-large-unit-insns IPA-CP . large-stack-frame . . large-stack-frame-growth . 1000 11 . max-inline-insns-recursive max-inline-insns-recursive-auto (out-of-line) - . --param max-inline-insns-recursive inline . inline -finline-functions ( -O3) --param max-inline-insns-recursive-auto . max-inline-recursive-depth max-inline-recursive-depth-auto . --param max-inline-recursive-depth inline . inline -finline-functions ( -O3) --param max-inline-recursive-depth-auto . min-inline-recursive-probability (prologue) . ( -fprofile-generate ) . ( ) . early-inlining-insns (early inliner) . (abstraction penalty) . max-early-inliner-iterations . . (late inlining) . comdat-sharing-probability ( ) C++ comdat . modref-max-bases modref-max-refs modref-max-accesses mod/ref . modref-max-tests alias oracle mod/ref . --param modref-max-bases --param modref-max-refs . modref-max-depth DFS modref . 0 . modref-max-escape-points modref SSA-name . modref-max-adjustments modref . profile-func-internal-id . 0 . min-vect-loop-bound -ftree-vectorize . . gcse-cost-distance-ratio GCSE . (code hoisting) . ( gcse-unrestricted-cost ) . 0 . gcse-unrestricted-cost ( ) GCSE . . . 0 . max-hoist-depth (dominator tree) . . 0 . max-tail-merge-comparisons (bb) bb . (tree tail merging) . max-tail-merge-iterations . . store-merging-allow-unaligned (unaligned) . max-stores-to-merge . max-store-chains-to-track . max-stores-to-track ..IP max-unrolled-insns 4 (unroll) . . max-average-unrolled-insns . . max-unroll-times (unrolling) . max-peeled-insns (peel) . . max-peel-times (peeling) . max-peel-branches (hot path) . max-completely-peeled-insns (insns) . max-completely-peel-times . max-completely-peel-loop-nest-depth (loop nest) . max-unswitch-insns unswitch. max-unswitch-depth unswitch. lim-expensive (loop invariant motion LIM). min-loop-cond-split-prob FDO min-loop-cond-split-prob (loop split) . iv-consider-all-candidates-bound (induction variables IV) . . iv-max-considered-uses . iv-always-prune-cand-set-bound iv () . avg-loop-niter . dse-max-object-size ( ) (dead store elimination) . . dse-max-alias-queries-per-store (alias oracle) . . scev-max-expr-size (scalar evolutions analyzer). . scev-max-expr-complexity . . max-tree-if-conversion-phi-args PHI (TREE if conversion) simd . vect-max-layout-candidates ( ) . vect-max-version-for-alignment-checks . vect-max-version-for-alias-checks . vect-max-peeling-for-alignment . -1 . max-iterations-to-track (brute-force) . hot-bb-count-fraction n 1/n (hot) . 10000 1/10000 . 0 . LTO . hot-bb-count-ws-permille () 0 1000 . 990 990 99.0 . 0 . LTO . hot-bb-frequency-fraction n 1/n . 1000 1/1000 . 0 . unlikely-bb-count-fraction n 1/n (unlikely executed) . 20 1/20 5 . 0 . max-predicted-iterations . . 10 . . builtin-expect-probability . ( 0 100) . builtin-string-cmp-inline-length (builtin string cmp) (inlining) . align-threshold (align) . align-loop-iterations . tracer-dynamic-coverage tracer-dynamic-coverage-feedback (superblock) . . tracer-dynamic-coverage-feedback . ( ) . tracer-max-code-growth (tail duplication) . (cross jumping) . tracer-min-branch-ratio ( ) . tracer-min-branch-probability tracer-min-branch-probability-feedback . tracer-dynamic-coverage . tracer-min-branch-probability-feedback tracer-min-branch-probability . () tracer ..IP stack-clash-protection-guard-size 4 num . (probes) stack clash . stack-clash-protection-probe-interval (stack clash) . num . stack clash . max-cse-path-length (basic blocks) CSE . max-cse-insns CSE (flushing) . ggc-min-expand GCC (garbage collector) . (heap) . . 30% + 70% * (RAM/1GB) RAM >= 1GB . "getrlimit" <> RAM "RLIMIT_DATA" "RLIMIT_AS" . GCC RAM . ggc-min-heapsize . . ggc-min-heapsize . ggc-min-expand% ggc-min-heapsize . . RAM/8 RLIMIT_RSS RLIMIT_DATA RLIMIT_AS ( ) ( ). GCC RAM . . ggc-min-expand . max-reload-search-insns (reload) . . max-cselib-memory-locations cselib . . max-sched-ready-insns (issue) . . max-sched-region-blocks (region) . max-pipeline-region-blocks (pipelining) (selective scheduler) . max-sched-region-insns (insns) . max-pipeline-region-insns . min-spec-prob ( ) (speculative) . max-sched-extend-regions-iters CFG . 0 . max-sched-insn-conflict-delay (speculative motion). sched-spec-prob-cutoff ( ) . sched-state-edge-prob-cutoff (edge) . sched-mem-true-dep-cost ( CPU) (store) (load) . selsched-max-lookahead (lookahead window) . . selsched-max-sched-times . . selsched-insns-to-rename (ready list) . sms-min-sc (stage count) swing modulo . max-last-value-rtl RTL combiner (pseudo register) . max-combine-insns RTL . max-combine-search-insns RTL . . . integer-share-limit . . ssp-buffer-size ( ) -fstack-protector (stack smashing) . min-size-for-stack-sharing (stack slot sharing) . max-jump-thread-duplication-stmts (statements) (jump threading) . max-jump-thread-paths . . max-fields-for-field-sensitive (pointer analysis) . prefetch-latency (prefetch) . . ( simultaneous-prefetches). simultaneous-prefetches . l1-cache-line-size L1 . l1-cache-size L1 . l2-cache-size L2 . prefetch-dynamic-strides (hints) (strides) . . 1 . prefetch-minimum-stride 0 . prefetch-minimum-stride . . . . -1 . ..IP destructive-interference-size 4 constructive-interference-size C++17 "std::hardware_destructive_interference_size" "std::hardware_constructive_interference_size". (offset) . L1 . L1 . ABI . -mtune ABI . static_assert . -Winterference-size . loop-interchange-max-num-stmts (stmts) (interchange) . loop-interchange-stride-ratio (stride) . min-insn-to-prefetch-ratio . prefetch-min-insn-to-mem-ratio . use-canonical-types <<>> (canonical) . 1 C++ Objective-C++ . 0 . switch-conversion-max-branch-ratio switch switch-conversion-max-branch-ratio switch . switch-lower-slow-alg-max-cases case (lowering) switch. max-partial-antic-length partial antic (-ftree-pre) -O3 . . . 0 . rpo-vn-max-loop-depth (value- numbered) . rpo-vn-max-loop-depth . sccvn-max-alias-queries-per-access alias-oracle (loads) (stores) . . . ira-max-loops-num IRA (regional register allocation) . . ira-max-conflict-table-size IRA . (MB) . ira-loop-reserved-regs IRA ( -O3). . . ira-consider-dup-in-all-alts IRA ( ) . IRA . IRA . ira-simple-lra-insn-threshold 1K RA . lra-inheritance-ebb-probability-cutoff LRA (reloaded) . . EBB . (fall-through edge) BB EBB LRA . SPEC2000 x86-64 . loop-invariant-max-bbs-in-loop (loop invariant motion) . . loop-max-datarefs-for-datadeps . . . max-vartrack-size . . . . max-vartrack-expr-depth . . . max-debug-marker-count ( begin stmt) RTL . gimple RTL . min-nondebug-insn-uid uid . -fvar-tracking-assignments uid ( ) . ipa-sra-deref-prob-threshold IPA-SRA NULL ( ) . ipa-sra-ptr-growth-factor IPA-SRA (aggregate) ipa-sra-ptr-growth-factor . ipa-sra-ptrwrap-growth-factor ipa-sra . ipa-sra-max-replacements IPA-SRA . (formal parameter) . sra-max-scalarization-size-Ospeed sra-max-scalarization-size-Osize (SRA IPA-SRA) . ( ) (sra-max-scalarization-size-Ospeed) (sra-max-scalarization-size-Osize) ..IP sra-max-propagations 4 << >> (SRA) (copy propagation) . tm-max-aggregate-size (thread-local) / (save/restore) (logging) . -fgnu-tm . graphite-max-nb-scop-params Graphite << >> (SCoP) . . SCoP SCoP . hardcfr-max-blocks -fharden-control-flow-redundancy . . hardcfr-max-inline-blocks -fharden-control-flow-redundancy (out-of-line) . loop-block-tile-size (loop blocking) (strip mining) -floop-block -floop-strip-mine . loop-block-tile-size . ipa-jump-function-lookups (jump function) . ipa-cp-value-list-size IPA-CP (devirtualization) . ipa-cp-value-list-size . ipa-cp-eval-threshold IPA-CP (cloning) ipa-cp-eval-threshold . ipa-cp-max-recursive-depth . ipa-cp-min-recursive-probability . ipa-cp-profile-count-base -fprofile-use IPA-CP . ipa-cp-recursive-freq-factor (interprocedural copy propagation) . ipa-cp-recursion-penalty . ipa-cp-single-call-penalty . ipa-max-agg-items IPA-CP (aggregate) . ipa-max-agg-items . ipa-cp-loop-hint-bonus IPA-CP ipa-cp-loop-hint-bonus . ipa-max-loop-predicates IPA . ipa-max-aa-steps IPA-CP (alias analysis) . ipa-max-aa-steps (clobbered) . ipa-max-switch-predicate-bounds case switch. switch IPA-CP default switch . ipa-max-param-expr-ops IPA-CP . ipa-max-param-expr-ops IPA . lto-partitions WHOPR . CPU . lto-min-partition WHOPR ( ). . lto-max-partition WHOPR ( ) . (balanced partitioning) . lto-partition-locality-frequency-cutoff n 1/n . 0 . lto-partition-locality-size-cutoff (inlined) . lto-max-locality-partition LTO ( ). 0 . lto-max-streaming-parallelism (streaming) LTO. cxx-max-namespaces-for-diagnostic-help C++ . sink-frequency-threshold ( ) (statement sinking). . . max-stores-to-sink . (-ftree-vectorize) (-ftree-loop-if-convert) 0 . case-values-threshold (jump-table) . 0 . jump-table-max-growth-ratio-for-size ( ). . jump-table-max-growth-ratio-for-speed ( ). . tree-reassoc-width (reassociated tree) . . sched-pressure-algorithm -fsched-pressure. 1 . 2 1 . . haifa-sched.cc GCC . . max-slsr-cand-scan (straight-line strength reduction) . asan-globals . -fsanitize=address . --param asan-globals=0 . asan-stack . -fsanitize=address . --param asan-stack=0 ..IP asan-instrument-reads 4 . -fsanitize=address . --param asan-instrument-reads=0 . asan-instrument-writes . -fsanitize=address . --param asan-instrument-writes=0 . asan-memintrin (built-in) . -fsanitize=address . --param asan-memintrin=0 . asan-use-after-return (use-after-return) . -fsanitize=address . --param asan-use-after-return=0 . : . "detect_stack_use_after_return=1" ASAN_OPTIONS . asan-instrumentation-with-call-threshold (instrumentation) (callbacks) . --param asan-instrumentation-with-call-threshold=0 . asan-kernel-mem-intrinsic-prefix "memcpy" "memset" "memmove" -fsanitize=kernel-address -fsanitize=kernel-hwaddress __asan_ __hwasan_ . hwasan-instrument-stack hwasan . -fsanitize=hwaddress -fsanitize=kernel-hwaddress . --param hwasan-instrument-stack=0 --param hwasan-instrument-stack=1 . hwasan-random-frame-tag . . -fsanitize=hwaddress -fsanitize=kernel-hwaddress . --param hwasan-random-frame-tag=0 . hwasan-instrument-allocas hwasan . -fsanitize=hwaddress -fsanitize=kernel-hwaddress . --param hwasan-instrument-allocas=0 --param hwasan-instrument-allocas=1 . hwasan-instrument-reads hwasan . -fsanitize=hwaddress -fsanitize=kernel-hwaddress . --param hwasan-instrument-reads=0 . hwasan-instrument-writes hwasan . -fsanitize=hwaddress -fsanitize=kernel-hwaddress . --param hwasan-instrument-writes=0 . hwasan-instrument-mem-intrinsics hwasan (builtin) . -fsanitize=hwaddress -fsanitize=kernel-hwaddress . --param hwasan-instrument-mem-intrinsics=0 . use-after-scope-direct-emission-threshold (shadow memory) ( ) . tsan-distinguish-volatile (volatile) . tsan-instrument-func-entry-exit __tsan_func_entry() __tsan_func_exit() . max-fsm-thread-path-insns (FSM). threader-debug threader-debug=[none|all] threader . parloops-chunk-size (chunk size) omp parloops . parloops-schedule omp parloops ( static dynamic guided auto runtime). parloops-min-per-thread . . max-ssa-name-query-depth (recursion) SSA (fold). use-def . max-speculative-devirt-maydefs may-def must-def (speculative) (devirtualize) . ranger-debug (ranges) . unroll-jam-min-percent (unroll-and-jam) . unroll-jam-max-unroll unroll-and-jam . max-rtl-if-conversion-unpredictable-cost RTL if-conversion . max-variable-expansions-in-unroller -fvariable-expansion-in-unroller . partial-inlining-entry-probability (entry BB) ( ) (partial inlining) . max-tracked-strlens strlen . gcse-after-reload-partial-fraction (partial redundancy elimination) reload. gcse-after-reload-critical-fraction (critical edges) reload . max-loop-header-insns (insns) . vect-epilogues-nomask (epilogue) . vect-partial-vector-usage . 0 . 1 . 2 . . vect-inner-loop-cost-factor . . . vect-induction-float . vect-force-slp SLP . vrp-block-limit VRP . vrp-sparse-threshold VRP . vrp-switch-limit switch VRP ..IP vrp-vector-threshold 4 VRP . avoid-fma-max-bits FMA . fully-pipelined-fma FMA () . (reassociation) FMUL FMA FADD FMA . sms-loop-average-count-threshold swing modulo scheduler . sms-dfa-history swing modulo scheduler DFA . graphite-allow-codegen-errors (codegen) -fchecking (ICE) . sms-max-ii-factor swing modulo scheduler . lra-max-considered-reload-pseudos reload (spilling) reload . max-pow-sqrt-depth sqrt . max-dse-active-local-stores RTL ( RTL DSE). asan-instrument-allocas asan alloca VLA. max-iterations-computation-cost . max-isl-operations isl 0 . graphite-max-arrays-per-scop scop. max-vartrack-reverse-op-size loc list . fsm-scale-path-stmts (threading path) --param=max-jump-thread-duplication-stmts . uninit-control-dep-attempts . uninit-max-chain-len AND OR . uninit-max-num-chains OR . uninit-max-prune-work . sched-autopref-queue-depth (autoprefetcher) . '0' ' . loop-versioning-max-inner-insns . loop-versioning-max-outer-insns . ssa-name-def-chain-limit SSA_NAME . GCC . store-merging-max-size (store merging) . store-forwarding-max-distance (stall) . '0' avoid-store-forwarding . hash-table-verification-limit . max-find-base-term-values (VALUEs) find_base_term. analyzer-max-enodes-per-program-point (exploded nodes) . analyzer-max-constraints . analyzer-min-snodes-for-call-summary (supernodes) . analyzer-max-enodes-for-full-dump dot . analyzer-max-recursion-depth . analyzer-max-svalue-depth . analyzer-max-infeasible-edges . gimple-fe-computed-hot-bb-threshold (hot) . GIMPLE FE . analyzer-bb-explosion-factor 'after supernode' . analyzer-text-art-string-ellipsis-threshold (text art) . analyzer-text-art-ideal-canvas-width . analyzer-text-art-string-ellipsis-head-len . analyzer-text-art-string-ellipsis-tail-len . ranger-logical-depth ranger . ranger-recompute-depth . relation-block-limit . transitive-relations-work-bound . min-pagesize (early break). openacc-kernels `kernels' OpenACC. --param=openacc-kernels=decompose `kernels' OpenACC . . --param=openacc-kernels=parloops `kernels' OpenACC parloops . . openacc-privatization -fopt-info-omp-note -fdump-tree-*-details OpenACC . --param=openacc-privatization=quiet . . --param=openacc-privatization=noisy . cycle-accurate-model GCC (cache miss) (cycle-accurate) . (in-order) (spill) . . / (out-of-order). name AArch64 :.IP aarch64-vect-compare-costs 4 (vectorizing) (cost model) . : * SVE Advanced SIMD SVE . * Advanced SIMD . * SVE <<>> (unpacked) . (extending loads) (truncating stores) . aarch64-float-recp-precision float. . . aarch64-double-recp-precision double. . . aarch64-autovec-preference ISA (auto-vectorization). default (heuristics) . asimd-only Advanced SIMD . sve-only SVE . prefer-asimd Advanced SIMD SVE. Advanced SIMD . prefer-sve Advanced SIMD SVE. SVE . aarch64-ldp-policy (ldp). --param=aarch64-ldp-policy=default (tuning structure) . . --param=aarch64-ldp-policy=always ldp . --param=aarch64-ldp-policy=never ldp . --param=aarch64-ldp-policy=aligned ldp . aarch64-stp-policy (stp). --param=aarch64-stp-policy=default . . --param=aarch64-stp-policy=always stp . --param=aarch64-stp-policy=never stp . --param=aarch64-stp-policy=aligned stp . aarch64-ldp-alias-check-limit (alias checks) / AArch64 ldp/stp . . aarch64-ldp-writeback / AArch64 (writeback) . writeback . . . aarch64-loop-vect-issue-rate-niters AArch64 SVE Advanced SIMD (latencies) (issue rates) . n GCC n Advanced SIMD . aarch64-vect-unroll-limit . . . name GCN : gcn-preferred-vectorization-factor : default 32 64. name i386 x86_64 : x86-stlf-window-ninsns STLF . x86-stv-max-visits use def STV . (Program Instrumentation Options) GCC (run-time instrumentation) . (hot spots) . (stack smashing) vtable C++ . (hook) (tracing) . -p -pg prof ( -p) gprof ( -pg). (linking) . "no_instrument_function" . -fprofile-arcs (arcs) . . ( ) C++ . auxname.gcda . (-fbranch-probabilities) (-ftest-coverage) . auxname (basename) . ( foo.gcda dir/foo.c dir/foo.gcda -o dir/foo.o). .gcda . "gcc a.c b.c -o binary" binary-a.gcda binary-b.gcda . -fcondition-coverage . . "gcov --conditions" . -fpath-coverage . (prime paths) . GCC -fpath-coverage-limit . "gcov --prime-paths --prime-paths-lines --prime-paths-source" . -fpath-coverage-limit=limit -fpath-coverage . GCC . - . 250000 . --coverage . -fprofile-arcs -ftest-coverage ( ) -lgcov ( ) . . -fprofile-arcs . -ftest-coverage . . * -fprofile-abs-path .gcno . gcov . * (object files) -lgcov -fprofile-arcs ( ). * . . . ISO C "fork" . .gcda . * -fbranch-probabilities . * gcov .gcno .gcda . gcov . -fprofile-arcs GCC . : . . -fcondition-coverage GCC . -fpath-coverage GCC (prime paths) -fpath-coverage-limit . -fpath-coverage . ( ) . -ftest-coverage gcov . auxname.gcno . auxname -fprofile-arcs . . -fprofile-abs-path .gcno . gcov . -fprofile-dir=path path . -fprofile-generate -ftest-coverage -fprofile-arcs -fprofile-use -fbranch-probabilities . . GCC path . sourcename.gcda (mangle) .gcda . -fprofile-arcs . -fprofile-note . . path export : %p (process ID). %q{VAR} VAR -fprofile-generate -fprofile-generate=path . -fprofile-generate . : -fprofile-arcs -fprofile-values -finline-functions -fipa-bit-cp. path GCC path . -fprofile-dir . -fprofile-use . -fprofile-info-section -fprofile-info-section=name / (constructor/destructor) (section) . name ".gcov_info" . -fprofile-arcs . . (hosted) GNU/Linux . (freestanding ) / I/O C . . GNU : .gcov_info : { PROVIDE (__gcov_info_start = .); KEEP (*(.gcov_info)) PROVIDE (__gcov_info_end = .); } (dump) : #include #include #include extern const struct gcov_info *const __gcov_info_start[]; extern const struct gcov_info *const __gcov_info_end[]; static void dump (const void *d, unsigned n, void *arg) { const unsigned char *c = d; for (unsigned i = 0; i < n; ++i) printf ("%02x", c[i]); } static void filename (const char *f, void *arg) { __gcov_filename_to_gcfn (f, dump, arg ); } static void * allocate (unsigned length, void *arg) { return malloc (length); } static void dump_gcov_info (void) { const struct gcov_info *const *info = __gcov_info_start; const struct gcov_info *const *end = __gcov_info_end; /* Obfuscate variable to prevent compiler optimizations. */ __asm__ ("" : "+r" (info)); while (info != end) { void *arg = NULL; __gcov_info_to_gcda (*info, filename, dump, allocate, arg); putchar ('\n'); ++info; } } int main (void) { dump_gcov_info (); return 0; } merge-stream gcov-tool "__gcov_filename_to_gcfn" "__gcov_info_to_gcda" .gcda ..IP -fprofile-note=path 4 path GCC .gcno path . .gcno . -fprofile-prefix-path=path profile-generate=profile_dir profile-use=profile_dir GCC . profile_dir (mangled) . . -fprofile-prefix-path=path path . -fprofile-prefix-map=old=new old ( --coverage) new . -ffile-prefix-map -fcanon-prefix-map . -fprofile-update=method . method single atomic prefer-atomic . (single-threaded) (thread-safe) . : (join) ( /detached ) . prefer-atomic atomic single . GCC -pthread prefer-atomic single . atomic (best- effort) . . libatomic libatomic . libatomic . . . . -fprofile-filter-files=regex ( ) . -fprofile-filter-files=main\.c;module.*\.c main.c C 'module' . -fprofile-exclude-files=regex ( ) . -fprofile-exclude-files=/usr/.* /usr/ . -fprofile-reproducible=[multithreaded|parallel-runs|serial] "-fprofile-generate" . . -fprofile-reproducible=serial -fprofile-generate . "fork" . ( ) . "no_instrument_function" . gcov-dump -l . -fprofile-reproducible=parallel-runs gcda . ( "make -j") . . -fsanitize=address AddressSanitizer . (out-of-bounds) (use- after-free) . -fsanitize-address-use-after-scope . . ASAN_OPTIONS . "help=1" . . -fsanitize=thread -fsanitize=hwaddress . -fsanitize=hwaddress x86-64 ( "-mlam=u48" "-mlam=u57") AArch64 ABI . -fsanitize=address -g . -O0 -O1 -Og ( ) -fno-optimize-sibling-calls ( -O0 -O1 -Og ) -fno-ipa-icf ( ) . -fno-omit-frame-pointer . ASLR ( ) ASLR . setarch `uname -m` -R ./prog . -fsanitize=kernel-address AddressSanitizer . . -fsanitize=hwaddress Hardware-assisted AddressSanitizer . . -fsanitize-address-use-after-scope . . HWASAN_OPTIONS . "help=1" . -fsanitize=thread -fsanitize=address AArch64 . -fsanitize=kernel-hwaddress Hardware-assisted AddressSanitizer . -fsanitize=kernel-address -fsanitize=hwaddress . hwasan . : -fsanitize=hwaddress . alloca --param hwasan-instrument-stack=1 --param hwasan-instrument-allocas=1 . . -fsanitize=pointer-compare (< <= > >=) . -fsanitize=kernel-address -fsanitize=address . -fsanitize=thread . : . "detect_invalid_pointer_pairs=2" ASAN_OPTIONS . "detect_invalid_pointer_pairs=1" (non-null) . -fsanitize=pointer-subtract . -fsanitize=kernel-address -fsanitize=address . -fsanitize=thread . : . "detect_invalid_pointer_pairs=2" ASAN_OPTIONS . "detect_invalid_pointer_pairs=1" (non-null) . -fsanitize=shadow-call-stack ShadowCallStack ( ) . (prologue) (epilogue) . . aarch64 . CONFIG_SHADOW_CALL_STACK . libc libgcc . . ABI . aarch64 "x18" . ShadowCallStack -ffixed-x18 -ffixed-x18 "x18" (clobber) . ShadowCallStack (exception handling) . -fno-exceptions . ..IP -fsanitize=thread 4 ThreadSanitizer (data race). (instrument) . . TSAN_OPTIONS . -fsanitize=address -fsanitize=leak . -fsanitize=thread -g . (-fnon-call-exceptions) . -fsanitize=leak LeakSanitizer (memory leak). (linking) . "malloc" . . LSAN_OPTIONS . -fsanitize=thread . -fsanitize=undefined UndefinedBehaviorSanitizer (undefined behavior). . . UBSAN_OPTIONS . : -fsanitize=shift . C ++C ISO C90 C99 . -fsanitize=shift-base -fsanitize=shift-exponent . -fsanitize=shift-exponent (promoted) . -fsanitize=shift-base . C ++C ISO C90 C99 . -fsanitize=integer-divide-by-zero . -fsanitize=unreachable "__builtin_unreachable" (diagnostic) . "__builtin_unreachable" . -fsanitize=vla-bound (VLA) . -fsanitize=null . NULL (dereference) ( rvalue) NULL NULL . -fsanitize=return return . -void . ++C . -fsanitize=signed-integer-overflow . "+" "*" "-" . "INT_MIN / -1" . : signed char a = SCHAR_MAX; a++; -fsanitize=bounds . . (flexible array members) - - "-fstrict-flex-arrays" "-fstrict-flex-arrays=" "strict_flex_array" - . -fsanitize=bounds-strict . - . . -fsanitize=alignment . -fsanitize=object-size "__builtin_dynamic_object_size" . . -fsanitize=float-divide-by-zero . -fsanitize=float-divide-by-zero -fsanitize=undefined (infinities) NaN . -fsanitize=float-cast-overflow . . -fsanitize=float-cast-overflow -fsanitize=undefined . "FE_INVALID" . -fsanitize=nonnull-attribute null "nonnull" null . -fsanitize=returns-nonnull-attribute return "returns_nonnull" null . -fsanitize=bool bool . 0/1 . -fsanitize=enum enum . enum . -fsanitize=vptr ++C (dynamic type) . -fsanitize=pointer-overflow . . -fsanitize=builtin (builtin) . 0 "__builtin_ctz" "__builtin_clz" . (false positive) -Wmaybe-uninitialized. -Werror . -ftrapv (trap) -fsanitize=undefined . C . -fno-sanitize=all . -fsanitize=all . -fasan-shadow-offset=number GCC (shadow offset) AddressSanitizer . (shadow memory) Kernel AddressSanitizer . -fsanitize-sections=s1,s2,... (sections) . si (wildcards) . -fsanitize-recover[=opts] -fsanitize-recover= opts . . . -fno-sanitize-recover= : . -fsanitize=undefined ( -fsanitize=unreachable -fsanitize=return) -fsanitize=float-cast-overflow -fsanitize=float-divide-by-zero -fsanitize=bounds-strict -fsanitize=kernel-address -fsanitize=address . -fsanitize=address . -fsanitize-recover=all -fno-sanitize-recover=all . (runtime) . ThreadSanitizer UndefinedBehaviorSanitizer "halt_on_error=0" AddressSanitizer "halt_on_error=1" . "halt_on_error" . opts . opts : undefined,float-cast-overflow,float-divide-by-zero,bounds-strict use-after-scope ( ). -fstack-reuse none . -fsanitize-trap[=opts] -fsanitize-trap= opts "libubsan" "__builtin_trap" . -fsanitizer-recover= "__builtin_trap" -fsanitize-recover= . "libubsan" (freestanding) . -fsanitize=undefined ( -fsanitize=vptr) -fsanitize=float-cast-overflow -fsanitize=float-divide-by-zero -fsanitize=bounds-strict . "-fsanitize-trap=all" "undefined" -fsanitize=float-cast-overflow -fsanitize=float-divide-by-zero -fsanitize=bounds-strict . "-fsanitize-trap=undefined" "-fsanitize-trap=all" "-fsanitize=vptr" (instrumentation) "libubsan" -fsanitize-trap=vptr . -fsanitize-undefined-trap-on-error -fsanitize-undefined-trap-on-error -fsanitize-trap=all . -fsanitize-coverage=trace-pc (coverage-guided fuzzing). "__sanitizer_cov_trace_pc" . -fsanitize-coverage=trace-cmp (dataflow guided fuzzing). "__sanitizer_cov_trace_cmp1" "__sanitizer_cov_trace_cmp2" "__sanitizer_cov_trace_cmp4" "__sanitizer_cov_trace_cmp8" "__sanitizer_cov_trace_const_cmp1" "__sanitizer_cov_trace_const_cmp2" "__sanitizer_cov_trace_const_cmp4" "__sanitizer_cov_trace_const_cmp8" "__sanitizer_cov_trace_cmpf" "__sanitizer_cov_trace_cmpd" float double "__sanitizer_cov_trace_switch" switch . -fcf-protection=[full|branch|return|none|check] -fcf-protection ( ). . Return-oriented Programming (ROP) call/jmp-oriented programming (COP/JOP) . -fcf-protection= : "branch" call/jmp . "return" . "full" "branch" "return" . "check" (LTO) . LTO -fcf-protection . "check" . "none" . -fcf-protection -fcf-protection=full . -fcf-protection -fcf-protection=none -fcf-protection=kind . "__CET__" -fcf-protection . "__CET__" "branch" "__CET__" "return" . "nocf_check" . x86 GNU/Linux Intel Control-flow Enforcement Technology (CET) i686 . -fharden-compares gimple ( /) "__builtin_trap" . -fharden-conditional-branches . -fharden-conditional-branches gimple "__builtin_trap" . -fharden-compares . -fharden-control-flow-redundancy trap . (mandatory tail calls - ) -fhardcfr-check-exceptions -fhardcfr-check-returning-calls noreturn -fhardcfr-check-noreturn-calls . --param hardcfr-max-blocks --param hardcfr-max-inline-blocks . (Tail call) . -fhardcfr-skip-leaf -fharden-control-flow-redundancy (leaf functions). -fhardcfr-check-exceptions -fharden-control-flow-redundancy (cleanup) (reraise). -fno-hardcfr-check-exceptions . -fhardcfr-check-returning-calls -fharden-control-flow-redundancy ( ) (tail-call) . (sibling call) ( -foptimize-sibling-calls) ( ) . -fhardcfr-check-noreturn-calls=[always|no-xthrow|nothrow|never] -fharden-control-flow-redundancy "noreturn" (always) (no-xthrow ) (nothrow) (never). "noreturn" ( cleanup) . -fhardcfr-check-exceptions "noreturn" cleanup cleanup . "noreturn" . "noreturn" / "nothrow" cleanup . "noreturn" no-xthrow : "noreturn" () . -fhardened C C++ ABI . GCC : -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -ftrivial-auto-var-init=zero -fPIE -pie -Wl,-z,relro,-z,now -fstack-protector-strong -fstack-clash-protection -fcf-protection=full ( x86 GNU/Linux) -fhardened --help=hardened . glibc -D_FORTIFY_SOURCE=2 . (production) (debug). -fhardened GNU/Linux . -fhardened . -fhardened -fstack-protector -fstack-protector -fstack-protector-strong ..IP -fstack-protector 4 (stack smashing). . "alloca" . . . . -fstack-protector-all -fstack-protector . -fstack-protector-strong -fstack-protector --- . . -fstack-protector-explicit -fstack-protector "stack_protect" . -fstack-check . () . . . : no generic () specific -fstack-check . : 1. : . . 2. : . 3. : . (fallback) specific . -fstack-check= Ada . specific Ada . (stack-clash) . -fstack-clash-protection . -fstack-clash-protection (stack clash). . . . -fstack-clash-protection . -fstack-check=specific -fstack-clash-protection . -fstack-limit-register=reg -fstack-limit-symbol=sym -fno-stack-limit . . . 0x80000000 -fstack-limit-symbol=__stack_limit -Wl,--defsym,__stack_limit=0x7ffe0000 128KB . GNU . "no_stack_limit" . -fsplit-stack . . . x86 GNU/Linux . -fsplit-stack -fsplit-stack . -fsplit-stack -fsplit-stack . gold 2.21 GNU binutils . -fstrub=disable (stack scrubbing) "strub". -fstrub=strict "disabled" "strub" (strict) "strub"-"callable" ( "at-calls" "callable" "always_inline" "internal") "strub" ( "at-calls" "internal") ("callable") . -fstrub=relaxed ("strub") "strub" "strub" . "Relaxed" strub "disabled" "strub" . -fstrub=* . -fstrub=at-calls "at-calls" "strub" . . "strub" . "strub" . . "strub" . -fstrub=internal "internal" "strub" . . "strub" "strub" . . -fstrub=all "strub" . strub "at-calls" . -fdump-ipa-strubm . "strub" . -fvtable-verify=[std|preinit|none] ++C . ( -fvtable-verify=none ) vtable . vtable . vtable . std preinit . "main" . -fvtable-verify=std . -fvtable-verify=preinit . none std preinit preinit std . -fvtv-debug -fvtable-verify=std -fvtable-verify=preinit vtable . vtable . vtv_set_ptr_data.log VTV_LOGS_DIR ( ) . : (appends) . ..IP -fvtv-counts 4 . -fvtable-verify=std -fvtable-verify=preinit . . vtv_count_data.log VTV_LOGS_DIR ( ) . vtable vtv_class_set_sizes.log . : (append) . . -finstrument-functions (instrumentation) . (profiling) (call site) . ( "__builtin_return_address" .) void __cyg_profile_func_enter (void *this_fn, void *call_site); void __cyg_profile_func_exit (void *this_fn, void *call_site); . (inline) . . . . C "extern inline" . ( .) "no_instrument_function" . ( ) . -finstrument-functions-once -finstrument-functions . "once" (data races) . . -finstrument-functions-exclude-file-list=file,file,... ( -finstrument-functions ). file . : file . : -finstrument-functions-exclude-file-list=/bits/stl,include/sys /bits/stl include/sys . , sym , . -finstrument-functions-exclude-file-list=',,tmp' ( ). -finstrument-functions-exclude-function-list=sym,sym,... -finstrument-functions-exclude-file-list . "vector blah(const vector &)" ( "_Z4blahRSt6vectorIiSaIiEE"). : sym . C99 C++ UTF-8 (universal character names) . -fpatchable-function-entry=N[,M] N NOP M NOP . M 0 NOP . NOP (code segment) . NOP NOP GCC "gen_nop" . / . M "__patchable_function_entries" . "__attribute__ ((patchable_function_entry (N,M)))" -fpatchable-function-entry=N,M . . "N=0" . NOP --- M --- (prologue) . PowerPC ELFv2 ABI . -msplit-patch-nops . N M . PowerPC ELFv2 ABI M -msplit-patch-nops 0 2 6 14 ..SS " (Options Controlling the Preprocessor)" C C . -E . -E . include Directory Options . Warning Options . -D name name 1 . -D name=definition definition (tokenized) #define . . (shell) (quoting) . ( ) . . sh csh -D'name(args...)=definition' . -D -U . -imacros file -include file -D -U . -U name name -D . -include file file "#include "file"" . file . "#include "..."" . -include (include) . -imacros file -include file . . (header) . -imacros -include . -undef GCC . . -pthread (POSIX threads) . . GNU/Linux Unix x86 Cygwin MinGW . -M make . make (object file) include -include -imacros . ( -MT -MQ) . include \- . . -dM . -MF DEPENDENCIES_OUTPUT . . -M -E -w . -MM -M include . #include -MM . -MF file -M -MM . -MF . -MD -MMD -MF . file - stdout . -MG -M -MG . "#include" . -MG . makefile . -Mno-modules . -MP CPP (phony target) . make Makefile . : test.o: test.c test.h test.h: -MT target . CPP .c . (target) . -MT . -MT -MT . -MT '$(objpfx)foo.o' : $(objpfx)foo.o: foo.c -MQ target -MT Make . -MQ '$(objpfx)foo.o' : $$(objpfx)foo.o: foo.c -MQ . -MD -MD -M -MF file -E . file -o . .d .d . -MD -E -o -E -o . -E -MD . -MMD -MD . -fpreprocessed . trigraph . -C . (tokenizer) . -fpreprocessed .i .ii .mi . GCC -save-temps ..IP -fdirectives-only 4 . -E -fpreprocessed . -E "#define" "#ifdef" "#error" . (trigraphs) . -dD . -fpreprocessed . "__LINE__" . "-E -fdirectives-only" . -E -fpreprocessed -fpreprocessed . "-E -fdirectives-only" . -fdollars-in-identifiers $ . -fextended-identifiers (universal character names) . C99 ( C) ++C . -fno-canonical-system-headers (canonicalization) . -fmax-include-depth=depth #include. . -fsearch-include-path[=kind] #include . C++20 : g++ -c -std=c++20 -fmodules -fsearch-include-path bits/stdc++.h bits/std.cc kind user #include "..." system "#include <...>" . -ftabstop=width (tab stops). . . . -ftrack-macro-expansion[=level] . . . level . 0 level . 1 . (function-like) . 2 . . 2 . "-ftrack-macro-expansion=2" . -fmacro-prefix-map=old=new old "__FILE__" "__BASE_FILE__" new . . new . "__builtin_FILE()" . : -ffile-prefix-map -fcanon-prefix-map. -fexec-charset=charset . UTF-8 . charset "iconv" . -fwide-exec-charset=charset . UTF-32BE UTF-32LE UTF-16BE UTF-16LE "wchar_t" big-endian little-endian . -fexec-charset charset "iconv" "wchar_t" . -finput-charset=charset GCC. locale GCC locale UTF-8 . locale . . charset "iconv" . -fpch-deps . . -fpch-preprocess -E . "#pragma" "#pragma GCC pch_preprocess "filename"" filename . -fpreprocessed GCC "#pragma" PCH . GCC . -save-temps . "#pragma" PCH . GCC . -fworking-directory (linemarkers) . . GCC . -fno-working-directory . -P "#line" . -A predicate=answer (assertion) predicate answer. -A predicate(answer) . -A -predicate=answer (assertion) predicate answer. -C (comments) . . -C . # . -CC . -C . -C -CC ++C C . . -CC lint . -P . C . -traditional -traditional-cpp C ISO C. GNU CPP . GCC C -E CPP . -trigraphs ISO C (trigraphs). ?? ISO C . ??/ \ '??/n' (newline) . : Trigraph: ??( ??) ??< ??> ??= ??/ ??' ??! ??- Replacement: [ ] { } # \ ^ | ~ GCC . -std -ansi ..IP -remap 4 MS-DOS. -H (header) . #include . ...x ...! . -dletters (debugging dumps) letters . . letters GCC . letters . -dM #define . . foo.h touch foo.h; cpp -dM foo.h . -dM -E -dM -fdump-rtl-mach . -dD -dM #define . . -dN -dD . -dI #include . -dU -dD #undef . -fdebug-cpp GCC . CPP -E (location maps) . . GCC -E . -Wp,option -Wp,option (compiler driver) option . option . -Wp . -Wp . -Xpreprocessor option option . GCC . -Xpreprocessor . -no-integrated-cpp . GCC . (cc1 cc1plus cc1obj C C++ Objective-C) . -B -wrapper . (Passing Options to the Assembler) . -Wa,option option . option . -Xassembler option option . GCC . -Xassembler . (Options for Linking) (object files) . . object-file-name . ( .) . -c -S -E . -flinker-output=type (LTO) . . LTO . type exec . -fpic -fpie . type dyn . -fpic -fPIC . (PIC) ( x86) . type pie -fpie . exec -fpie . type rel . . -ffat-lto-objects LTO . . . nolto-rel . ( ) . ( -r) rel . GNU Binutils LTO LTO . nolto-rel . . binutils H.J. Lu . -fuse-ld=bfd bfd . -fuse-ld=gold gold . -fuse-ld=lld lld LLVM . -fuse-ld=mold (mold) . -llibrary -l library library . ( POSIX .) -l GCC . . GNU . . -L . liblibrary.a . liblibrary.so . -static . . foo.o -lz bar.o z foo.o bar.o . bar.o z ..IP -lobjc 4 Objective-C Objective-C++ -l . -nostartfiles . -nostdlib -nolibc -nodefaultlibs . -nodefaultlibs . -static-libgcc -shared-libgcc . -nostartfiles . "memcmp" "memset" "memcpy" "memmove" . libc . . -nolibc C . libgcc libgnat libgfortran libstdc++ . -lc C -lpthread -lm . bare-board C . -nostdlib . -static-libgcc -shared-libgcc . "memcmp" "memset" "memcpy" "memmove" . libc . . -nostdlib -nodefaultlibs libgcc.a GCC . libgcc.a . -nostdlib -nodefaultlibs -lgcc . GCC . ( "__main" C++ .) -nostdlib++ C++ . -e entry --entry=entry entry . GNU . -pie . (-fpie -fPIE ) . -no-pie . -static-pie . . (-fpie -fPIE ) . -pthread POSIX . GNU/Linux x86 Cygwin MinGW . . -r . . -rdynamic -export-dynamic ELF . . "dlopen" (backtrace) . -s . -static -pie . . -shared . . (-fpic -fPIC ) .[1] -shared-libgcc -static-libgcc libgcc . libgcc . libgcc . (throw and catch) . libgcc . G++ -shared-libgcc C++ . GCC libgcc . GCC GNU GNU --eh-frame-hdr libgcc . libgcc libgcc . . G++ -shared-libgcc libgcc . -static-libasan -fsanitize=address GCC libasan . libasan -static libasan . -static-libasan GCC libasan . -static-libtsan -fsanitize=thread GCC libtsan . libtsan -static libtsan . -static-libtsan GCC libtsan . -static-liblsan -fsanitize=leak GCC liblsan . liblsan -static liblsan . -static-liblsan GCC liblsan . -static-libubsan -fsanitize=undefined GCC libubsan . libubsan -static libubsan . -static-libubsan GCC libubsan . -static-libstdc++ g++ C++ libstdc++ . libstdc++ -static libstdc++ . . libstdc++ . -static-libstdc++ g++ libstdc++ ..IP -symbolic 4 (shared object) . ( -Xlinker -z -Xlinker defs ). . -T script script . GNU . bare-board -T . -Xlinker option option . GCC . -Xlinker . -assert definitions -Xlinker -assert -Xlinker definitions. -Xlinker "-assert definitions" . GNU option=value . -Xlinker -Map -Xlinker output.map -Xlinker -Map=output.map . . -Wl,option option . option ( ) . . -Wl,-Map,output.map -Map output.map . GNU -Wl,-Map=output.map . -u symbol symbol . -u . -z keyword -z keyword . . (Options for Directory Search) (header files) : -I dir -iquote dir -isystem dir -idirafter dir dir . dir = $SYSROOT = $SYSROOT sysroot --sysroot -isysroot . -iquote "#include "file"" . -I -isystem -idirafter "#include "file"" "#include " . . : 1. include . 2. include -iquote . 3. -I . 4. -isystem . 5. . 6. -idirafter . -I . (vendor) -isystem . -isystem -idirafter . include -isystem -I -I . include . GCC "#include_next" . -nostdinc / -isystem . -I- include . . -I -I- -iquote -I- . -I -I- "#include "file"" "#include " . -I -I- #include . -I- "#include "file"" . -I- . -iprefix prefix prefix -iwithprefix . / . -iwithprefix dir -iwithprefixbefore dir dir -iprefix include . -iwithprefixbefore -I -iwithprefix -idirafter . -isysroot dir --sysroot ( Darwin ). --sysroot . -imultilib dir dir C++ . -nostdinc . -I -iquote -isystem / -idirafter ( ). -nostdinc++ C++ . ( C++ .) --embed-dir=dir dir "#embed" "__has_embed" . "#embed" . dir = $SYSROOT = $SYSROOT sysroot --sysroot -isysroot . -iplugindir=dir -fplugin=path/name.so -fplugin=name . (driver) . -Ldir dir -l . -Bprefix include . (compiler driver) cpp cc1 as ld . prefix machine/version/ . -B ( ) . -B /usr/lib/gcc/ /usr/local/lib/gcc/ . PATH . -B . -B -L . include -isystem . include . libgcc.a -B . . . ( -B) GCC_EXEC_PREFIX . (kludge) -B [dir/]stageN/ ( N 0 9 ) [dir/]include . (boot-strapping) ..IP -no-canonical-prefixes 4 /../ /./ . --sysroot=dir dir . /usr/include /usr/lib dir/usr/include dir/usr/lib . -isysroot --sysroot -isysroot . (GNU linker) ( 2.16 ) . --sysroot . --no-sysroot-suffix (targets) --sysroot dir/usr/include dir/suffix/usr/include . . (Options for Code Generation Conventions) (interface conventions) . -ffoo -fno-foo . --- . no- . -fstack-reuse=reuse-level / . reuse_level all named_vars none . all named_vars none . all . (scoped) . . (legacy) . int *p; { int local1; p = &local1; local1 = 10; .... } { int local2; local2 = 20; ... } if (*p == 10) // out of scope use of local1 { } : struct A { A(int k) : i(k), j(k) { } int i; int j; }; A *ap; void foo(const A& ar) { ap = &ar; } void bar() { foo(A(10)); // temp object's lifetime ends when foo returns { A a(20); .... } ap->i+= 10; // ap references out of scope temp whose space // is reused with a. What is the value of ap->i? } ++C . . . . -ftrapv (trap) . -ftrapv -fwrapv -ftrapv -fwrapv -fwrapv . -ftrapv -fwrapv -fno-wrapv -ftrapv . -fwrapv (twos-complement) (wrap around) . . -ftrapv -fwrapv -ftrapv -fwrapv -fwrapv . -ftrapv -fwrapv -fno-wrapv -ftrapv . -fwrapv-pointer . . -fstrict-overflow -fno-wrapv -fno-wrapv-pointer -fwrapv -fwrapv-pointer . -fexceptions . (propagate) . GCC (frame unwind information) . GCC ++C C . C ++C . ++C . -fnon-call-exceptions (trapping instructions) . . . "SIGALRM" . -fexceptions . -fdelete-dead-exceptions . "pure" "const" . Ada ++C . . -funwind-tables -fexceptions . . -fasynchronous-unwind-tables DWARF . ( ) . -fno-gnu-unique C ++C "STB_GNU_UNIQUE" (inline functions) "RTLD_LOCAL" "RTLD_LOCAL" . "dlclose" DSO DSO "dlclose" "dlopen" -fno-gnu-unique . -fpcc-struct-return <> "struct" "union" . GCC Portable C Compiler ( pcc) . . (alignment) . : -fpcc-struct-return -freg-struct-return . (ABI) ..IP -freg-struct-return 4 "struct" "union" . -fpcc-struct-return . -fpcc-struct-return -freg-struct-return GCC . GCC -fpcc-struct-return GCC . . : -freg-struct-return -fpcc-struct-return . (ABI) . -fshort-enums "enum" . "enum" . . : -fshort-enums GCC . (ABI) . -fshort-wchar "wchar_t" "short unsigned int" . WINE . : -fshort-wchar GCC . (ABI) . -fcommon C C tentative definitions ( ) . "extern" . -fno-common BSS . multiple-definition . -fcommon . . ++C . . -fno-ident "#ident" . -finhibit-size-directive ".size" . crtstuff.c . -fverbose-asm . ( ). -fno-verbose-asm . : * * FILENAME:LINENUMBER:CONTENT OF LINE * . C: int test (int n) { int i; int total = 0; for (i = 0; i < n; i++) total += i * i; return total; } (x86_64) -S stdout -o - gcc -S test.c -fverbose-asm -Os -o - : .file "test.c" # GNU C11 (GCC) version 7.0.0 20160809 (experimental) (x86_64-pc-linux-gnu) [...snip...] # options passed: [...snip...] .text .globl test .type test, @function test: .LFB0: .cfi_startproc # test.c:4: int total = 0; xorl %eax, %eax # # test.c:6: for (i = 0; i < n; i++) xorl %edx, %edx # i .L2: # test.c:6: for (i = 0; i < n; i++) cmpl %edi, %edx # n, i jge .L5 #, # test.c:7: total += i * i; movl %edx, %ecx # i, tmp92 imull %edx, %ecx # i, tmp92 # test.c:6: for (i = 0; i < n; i++) incl %edx # i # test.c:7: total += i * i; addl %ecx, %eax # tmp92, jmp .L2 # .L5: # test.c:10: } ret .cfi_endproc .LFE0: .size test, .-test .ident "GCC: (GNU) 7.0.0 20160809 (experimental)" .section .note.GNU-stack,"",@progbits . -frecord-gcc-switches . ASCII . -fverbose-asm . -grecord-gcc-switches . -fpic (PIC) . (GOT) . GOT ( GCC ). GOT -fpic -fPIC . ( SPARC 8k AArch64 28k m68k RS/6000 32k . x86 .) . x86 GCC PIC System V Sun 386i . IBM RS/6000 . "__pic__" "__PIC__" 1 . -fPIC . AArch64 m68k PowerPC SPARC . . "__pic__" "__PIC__" 2 ..IP -fpie 4 -fPIE -fpic -fPIC . -pie GCC . -fpie -fPIE "__pie__" "__PIE__" . -fpie -fPIE . -fno-plt PLT . GOT . (stubs) PLT GOT . x86 - PLT GOT . (Lazy binding) PLT -fno-plt . "noplt" PLT . PLT GOT . -fno-jump-tables switch . -fpic -fPIC . GOT . -fno-bit-tests switch . -ffixed-reg reg ( ). reg . "REGISTER_NAMES" . . -fcall-used-reg reg (clobber) . . reg . . . . -fcall-saved-reg reg . . reg . . . . . -fpack-struct[=n] (pack) . ( ) ( ). : -fpack-struct GCC . . (ABI) . -fleading-underscore -fno-leading-underscore C (object file) . . : -fleading-underscore GCC . . . -ftls-model=model (TLS) . model global-dynamic local-dynamic initial-exec local-exec . : -fpic . -fpic initial-exec -fpic global-dynamic . -ftrampolines (descriptors) . HP-PA IA-64 . . . -fno-trampolines . . -fno-trampolines Ada . -ftrampolines -fno-trampolines . . Ada "-ftrampolines" "-fno-trampolines" . -ftrampoline-impl=[stack|heap] . ( Apple M1) . -ftrampoline-impl=heap "__gcc_nested_func_ptr_created" "__gcc_nested_func_ptr_deleted" . libgcc : x86_64 Darwin x86_64 aarch64 Linux. : "setjmp" "longjmp" . -fvisibility=[default|internal|hidden|protected] ELF --- . (API) . . default (public) . protected internal hidden . -fvisibility default . ELF <> Ulrich Drepper ( ) --- hidden public . DLL Windows -fvisibility=hidden "__attribute__ ((visibility("default")))" "__declspec(dllexport)" . . "#pragma GCC visibility" . ( ) "#pragma GCC visibility push(hidden)" "#pragma GCC visibility pop" . API DSO hidden PLT --- . ISO C++ "operator new" "operator delete" default . default . "#pragma GCC visibility push(default)" . "extern" -fvisibility -fvisibility=hidden . "extern" PLT "__attribute ((visibility))" / "#pragma GCC visibility" "extern" hidden . -fvisibility (vague linkage) ++C . (exception) DSO default type_info DSO . ..IP -fstrict-volatile-bitfields 4 (bit-fields) volatile ( ) (natural alignment) . (memory-mapped peripheral registers) "unsigned short" ( short ) GCC . . (load) . "packed" . GCC (fault) (truncate) . : C/C++11 . . (ABI) . -fsync-libcalls (out- of-line) "__sync" "__atomic" C++11 . -fno-sync-libcalls . libatomic . -fzero-init-padding-bits=value (padding bits) . C23 ("{}") C++ C . . "-fzero-init-padding-bits=standard" . : struct A { char a; unsigned long long b; char c; }; union B { char a; unsigned long long b; }; struct A a = {}; // C23 guarantees padding bits are zero. struct A b = { 1, 2, 3 }; // No guarantees. union B c = {}; // C23 guarantees padding bits are zero. union B d = { 1 }; // No guarantees. "-fzero-init-padding-bits=unions" (unions) ( ) ( ). GCC GCC 15 "sizeof (unsigned long long) - 1" . "-fzero-init-padding-bits=all" (aggregates) "b.a" "b.b" ( ) ( ) . GCC GCC . (debug dumps) GCC . . GCC =filename . stdout - stderr . =filename (pass number) . . . final . i ( inter-procedural) l ( ) r (RTL) t ( tree) . . -fcallgraph-info -fcallgraph-info=MARKERS (callgraph) (object file) . VCG . . "su" -fstack-usage . "da" . -flto . LTO -fcallgraph-info LTO . -dletters -fdump-rtl-pass -fdump-rtl-pass=filename letters . RTL . -dletters -E . -fdump-rtl -d . pass letters : -fdump-rtl-alignments (branch alignments). -fdump-rtl-asmcons RTL / . -fdump-rtl-auto_inc_dec / (auto-inc- dec). . -fdump-rtl-barriers (barrier instructions). -fdump-rtl-bbpart (hot) (cold). -fdump-rtl-bbro (block reordering). -fdump-rtl-btl1 -fdump-rtl-btl2 -fdump-rtl-btl1 -fdump-rtl-btl2 (branch target load) . -fdump-rtl-bypass . -fdump-rtl-combine RTL. -fdump-rtl-compgotos goto (computed gotos). -fdump-rtl-ce1 -fdump-rtl-ce2 -fdump-rtl-ce3 -fdump-rtl-ce1 -fdump-rtl-ce2 -fdump-rtl-ce3 if (if-conversion) . -fdump-rtl-cprop_hardreg (hard register copy propagation). -fdump-rtl-csa (combining stack adjustments). -fdump-rtl-cse1 -fdump-rtl-cse1 -fdump-rtl-cse2 . -fdump-rtl-dce . -fdump-rtl-dbr . -fdump-rtl-dce1 -fdump-rtl-dce2 -fdump-rtl-dce1 -fdump-rtl-dce2 . -fdump-rtl-eh (EH). -fdump-rtl-eh_ranges (EH). -fdump-rtl-expand RTL. -fdump-rtl-fwprop1 -fdump-rtl-fwprop2 -fdump-rtl-fwprop1 -fdump-rtl-fwprop2 . -fdump-rtl-gcse1 -fdump-rtl-gcse2 -fdump-rtl-gcse1 -fdump-rtl-gcse2 . -fdump-rtl-init-regs . -fdump-rtl-initvals . -fdump-rtl-into_cfglayout cfglayout. -fdump-rtl-ira (IRA). -fdump-rtl-jump . -fdump-rtl-loop2 -fdump-rtl-loop2 rtl . -fdump-rtl-mach . -fdump-rtl-mode_sw . -fdump-rtl-rnreg . -fdump-rtl-outof_cfglayout cfglayout. -fdump-rtl-peephole2 (peephole). -fdump-rtl-postreload (post-reload). -fdump-rtl-pro_and_epilogue . -fdump-rtl-sched1 -fdump-rtl-sched2 -fdump-rtl-sched1 -fdump-rtl-sched2 . -fdump-rtl-ree /. -fdump-rtl-seqabstr . -fdump-rtl-shorten . -fdump-rtl-split1 -fdump-rtl-split2 -fdump-rtl-split3 -fdump-rtl-split4 -fdump-rtl-split5 . -fdump-rtl-sms (modulo scheduling). . -fdump-rtl-stack << >> GCC x87. x86 . -fdump-rtl-subreg1 -fdump-rtl-subreg2 -fdump-rtl-subreg1 -fdump-rtl-subreg2 subreg . -fdump-rtl-vartrack . -fdump-rtl-vregs . -fdump-rtl-web . -fdump-rtl-regclass -fdump-rtl-subregs_of_mode_init -fdump-rtl-subregs_of_mode_finish -fdump-rtl-dfinit -fdump-rtl-dfinish . -da -fdump-rtl-all . -dA . -dD . -dH core dump . -dp . . -dP RTL . -dp . -dx RTL . -fdump-rtl-expand . -fdump-debug . -fdump-earlydebug . -fdump-noaddr . diff / text / bss / data / heap / stack / dso ..IP -freport-bug 4 (ICE). -fdump-unnumbered . diff -g . -fdump-unnumbered-links ( -d ) . -fdump-ipa-switch -fdump-ipa-switch-options (inter-procedural analysis) . switch . : all . cgraph (call-graph) (inlining) . inline . strubm "strub" . strub "strub": (interface) (function wrapping) (builtin) . -optimized -missed -note -all -fopt-info -optimized . -fdump-ipa-inline-optimized-missed . ( -optimized) . -fdump-ipa-clones . (live-patch) ( -flive-patching ). "ipa-clones" . - (semicolon) . : 1. "Callgraph clone". 2. . 3. . (whole-program analysis) . 4. . 5. . 6. . 7. . 8. . . 9. . 10. . 11. . 12. . : 1. "Callgraph removal". 2. . 3. . . 4. . 5. . 6. . -fdump-lang . .lang . -fdump-lang-all -fdump-lang-switch -fdump-lang-switch-options -fdump-lang-switch-options=filename . options filename -fdump-tree . switch : all . class . 'slim' . C++ . module . lineno () graph () blocks () uid () alias ( ) asmname (Elrond) eh () vops () . C++ . raw . C++ . -fdump-passes (optimization passes) stderr. -fdump-statistics-option . .statistics . -option -stats -details . . -fdump-tree-all -fdump-tree-switch-options -fdump-tree-switch-options=filename (dumping) . -options options - . . : address . . . asmname "DECL_ASSEMBLER_NAME" "DECL_NAME" . (mangled) . slim (scope) . . (pretty-printed) . RTL RTL (slim) -LISP . raw (raw) . (pretty-printed) -C . details ( ). . stats ( ). blocks ( raw ). graph (-fdump-rtl-pass) (CFG) GraphViz file.passid.pass.dot . GraphViz . RTL RTL (slim) . vops (virtual operands) . lineno . uid ("DECL_UID") . verbose . eh EH ( ) . scev (scalar evolution). optimized ( ). missed ( ). note ( ). all raw slim verbose lineno. optall optimized missed note. : 1. GCC -fdump-passes stderr . "tree-evrp" "tree-vrp1" "tree-vrp2" (Value Range Propagation) . . 2. -fdump- GCC . Early Value Range Propagation GCC -fdump-tree-evrp . . GCC . 3. : GCC t ( r RTL) . Early VRP myfile.c.038t.evrp . GCC . -fopt-info -fopt-info-options -fopt-info-options=filename . -options options - . options : 1. 2. (verbosity) 3. . . . : optimized . . (vectorizer) . missed . . note . all . optimized missed note . : internals << >> . GCC . : ipa (interprocedural)..IP loop 4 (dump) . inline (inlining). omp OMP ( ). vec (vectorization). optall . . options optimized-optall << >> (internals) . filename filename . stderr . -fopt-info filename . . (translation units) filename . stderr . stderr : gcc -O3 -fopt-info : gcc -O3 -fopt-info-missed=missed.all missed.all : gcc -O2 -ftree-vectorize -fopt-info-vec-missed stderr . -fopt-info-vec-missed -fopt-info-missed-vec . -fopt-info . gcc -O3 -fopt-info-inline-optimized-missed=inline.txt inline.txt . : gcc -fopt-info-vec-missed=vec.miss -fopt-info-loop-optimized=loop.opt vec.miss loop.opt . . vec.miss . -fsave-optimization-record SRCFILE.opt-record.json.gz -fopt-info . JSON . -fopt-info-all : * (code hotness) * * << >> (inlining chain) ( ) * (expressions) (statements) (symbol-table nodes) * GCC * GCC (nested) . -fsched-verbose=n . n -fsched-verbose -fdump-rtl-sched1 -fdump-rtl-sched2 . n (basic block) (ready list) / (unit/insn) . n RTL (abort) . n -fsched-verbose . -fenable-kind-pass -fdisable-kind-pass=range-list / . GCC . / . -fdisable-ipa-pass IPA pass. pass . . -fdisable-rtl-pass -fdisable-rtl-pass=range-list RTL pass. pass . . range-list . . . . uid pass . uid -fdump-passes . -fdisable-tree-pass -fdisable-tree-pass=range-list (tree pass) pass. -fdisable-rtl . -fenable-ipa-pass IPA pass. pass . . -fenable-rtl-pass -fenable-rtl-pass=range-list RTL pass. -fdisable-rtl . -fenable-tree-pass -fenable-tree-pass=range-list (tree pass) pass. -fdisable-rtl . . # disable ccp1 for all functions -fdisable-tree-ccp1 # disable complete unroll for function whose cgraph node uid is 1 -fenable-tree-cunroll=1 # disable gcse2 for functions at the following ranges [1,1], # [300,400], and [400,1000] # disable gcse2 for functions foo and foo2 -fdisable-rtl-gcse2=foo,foo2 # disable early inlining -fdisable-tree-einline # disable ipa inlining -fdisable-ipa-inline # enable tree full unroll -fenable-tree-unroll -fchecking=n . . -fchecking=2 . -frandom-seed=string (seed) GCC . (coverage) . -frandom-seed . string ( ) ( CRC32 ). string . -save-temps <<>> -dumpbase -dumpdir . -x -save-temps . -save-temps . -save-temps=cwd -save-temps -dumpdir ./ . -save-temps=obj -save-temps -dumpdir outdir/ outdir/ -o . -o -save-temps=obj -save-temps=cwd . -time[=file] CPU . C ( ) . : # cc1 0.12 0.01 # as 0.00 0.01 << >> (user time) . << >> (system time) . . : 0.12 0.01 cc1 0.00 0.01 as << >> << >> . -fdump-final-insns[=file] (dump) (RTL) file. ( file "." ) ".gkd" -dumpbase . -fcompare-debug[=opts] opts -fcompare-debug-second . . -gtoggle . GCC_COMPARE_DEBUG -fcompare-debug . GCC_COMPARE_DEBUG opts -gtoggle . -fcompare-debug= opts -fno-compare-debug GCC_COMPARE_DEBUG . -fcompare-debug GCC_COMPARE_DEBUG -fcompare-debug-not-overridden GCC ( ) . GCC_COMPARE_DEBUG -w%n-fcompare-debug not overridden . -fcompare-debug-second -fcompare-debug . ".gk" . . -gtoggle . . -fcompare-debug . -fvar-tracking-assignments-toggle -fvar-tracking-assignments -gtoggle -g . -Q --help= -Q . (pass) . -ftime-report (pass) stderr . SARIF -fdiagnostics-format=sarif-file -fdiagnostics-format=sarif-stderr -ftime-report JSON SARIF . JSON stderr . -ftime-report-details (pass). -fira-verbose=n (integrated register allocator). . n n stderr . -flto-report (link-time optimizer). . GCC LTO ( -flto) . . -flto-report-wpa -flto-report WPA . -fmem-report . -fmem-report-wpa WPA . -fpre-ipa-mem-report -fpost-ipa-mem-report (interprocedural optimization) . -fmultiflags "TFLAGS" multilib (specs) . "TFLAGS" . . "TFLAGS" (specs) multilib . make TFLAGS=-fmultiflags --with-specs=%{fmultiflags:...} . driver self spec . "TFLAGS" -bootstrap --with-specs='%{!fmultiflags:%emissing TFLAGS}' ..IP -fprofile-report 4 () . -fstack-usage (stack) . .su auxname . auxname (basename) . : * . * . * : "static" "dynamic" "bounded". "static" : . . "dynamic" : push/pop . "bounded" () . . -fstats . ++C ++G . -fdbg-cnt-list . -fdbg-cnt=counter-value-list . counter-value-list name:lower_bound1-upper_bound1 [:lower_bound2-upper_bound2...] . lower_bound . -fdbg-cnt=dce:2-4:10-11,tail_call:10 dbg_cnt(dce) true . dbg_cnt(tail_call) true . -print-file-name=library library --- . GCC . -print-multi-directory multilib . GCC_EXEC_PREFIX . -print-multi-lib multilib . ; - @ . . -print-multi-os-directory multilib lib . lib multilib . libsuffix ../lib64 ../lib ../lib32 lib/subdir amd64 sparcv9 ev6 . -print-multiarch multiarch lib . -print-prog-name=program -print-file-name cpp . -print-libgcc-file-name -print-file-name=libgcc.a . -nostdlib -nodefaultlibs libgcc.a . : gcc -nostdlib ... `gcc -print-libgcc-file-name` -print-search-dirs gcc --- . gcc installation problem, cannot exec cpp0: No such file or directory . cpp0 gcc GCC_EXEC_PREFIX . (/) . -print-sysroot sysroot . sysroot --sysroot . sysroot . -print-sysroot-headers-suffix sysroot --- . -dumpmachine ( i686-pc-linux-gnu)--- . -dumpversion ( 3.0 6.3.0 7)--- . specs . ( major) ( major minor) ( patchlevel) . -dumpfullversion --- . : (major minor patchlevel). -dumpspecs specs --- . ( GCC .).SS " (Machine-Dependent Options)" GCC ABI . -m . . AArch64 AArch64 : -mabi=name . ilp32 SysV int long int lp64 SysV int long int . . ABI LP64 ILP32 ABI . ilp32 . -mbig-endian (big-endian). GCC aarch64_be-*-* . -mgeneral-regs-only . Advanced SIMD . -mlittle-endian (little-endian). GCC aarch64-*-* ( aarch64_be-*-*) . -mcmodel=tiny tiny. 1MB . . -mcmodel=small small. 4GB . . . -mcmodel=large large. . . -mcmodel=large -mabi=ilp32 -fpic -fPIC . -mtp=name (thread pointer). tpidr_el0 tpidrro_el0 tpidr_el1 tpidr_el2 tpidr_el3. el0 el1 el2 el3 . tpidr_el0 . . -mstrict-align -mno-strict-align . -momit-leaf-frame-pointer -mno-omit-leaf-frame-pointer (leaf functions). . -mstack-protector-guard=guard -mstack-protector-guard-reg=reg -mstack-protector-guard-offset=offset canary guard. global canary sysreg canary . -mstack-protector-guard-reg=reg -mstack-protector-guard-offset=offset canary . . -mtls-dialect=desc TLS TLS. . -mtls-dialect=traditional TLS TLS. -mtls-size=size TLS. 12 24 32 48. binutils 2.26 . -mfix-cortex-a53-835769 -mno-fix-cortex-a53-835769 835769 ARM Cortex-A53. NOP - . . -mfix-cortex-a53-843419 -mno-fix-cortex-a53-843419 843419 ARM Cortex-A53. . . -mlow-precision-recip-sqrt -mno-low-precision-recip-sqrt . -ffast-math -funsafe-math-optimizations . . -mlow-precision-sqrt -mno-low-precision-sqrt . -ffast-math -funsafe-math-optimizations . . -mlow-precision-recip-sqrt . -mlow-precision-div -mno-low-precision-div . -ffast-math -funsafe-math-optimizations . . -mtrack-speculation -mno-track-speculation (speculative execution) . "__builtin_speculation_safe_copy" . -moutline-atomics -mno-outline-atomics (out-of-line helpers) . LSE ARMv8.1-A load/store-exclusive ISA ARMv8.0 . ARMv8.0 . -march=armv8.1-a -march=armv8-a+lse ARMv8.1-Atomics . -mcpu= lse . . -march=name . -march=arch{+[no]feature}* . arch : armv8-a : Armv8-A : +fp, +simd armv8.1-a : Armv8.1-A : armv8-a, +crc, +lse, +rdma armv8.2-a : Armv8.2-A : armv8.1-a armv8.3-a : Armv8.3-A : armv8.2-a, +pauth, +fcma, +jscvt armv8.4-a : Armv8.4-A : armv8.3-a, +flagm, +fp16fml, +dotprod, +rcpc2 armv8.5-a : Armv8.5-A : armv8.4-a, +sb, +ssbs, +predres, +frintts, +flagm2 armv8.6-a : Armv8.6-A : armv8.5-a, +bf16, +i8mm armv8.7-a : Armv8.7-A : armv8.6-a, +wfxt, +xs armv8.8-a : Armv8.8-a : armv8.7-a, +mops armv8.9-a : Armv8.9-a : armv8.8-a armv9-a : Armv9-A : armv8.5-a, +sve, +sve2 armv9.1-a : Armv9.1-A : armv9-a, +bf16, +i8mm armv9.2-a : Armv9.2-A : armv9.1-a, +wfxt, +xs armv9.3-a : Armv9.3-A : armv9.2-a, +mops armv9.4-a : Armv9.4-A : armv9.3-a, +sve2p1 armv9.5-a : Armv9.4-A : armv9.4-a, cpa, +faminmax, +lut armv8-r : Armv8-R : armv8-r native / AArch64 . . -march=native -mcpu -mtune GCC . -march=native -mcpu=native . feature aarch64-feature-modifiers,,-march and -mcpu Feature Modifiers . . GCC name . -march -mtune -mcpu (tune) . -mtune=name GCC . : generic cortex-a35 cortex-a53 cortex-a55 cortex-a57 cortex-a72 cortex-a73 cortex-a75 cortex-a76 cortex-a76ae cortex-a77 cortex-a65 cortex-a65ae cortex-a34 cortex-a78 cortex-a78ae cortex-a78c ares exynos-m1 emag falkor oryon-1 neoverse-512tvb neoverse-e1 neoverse-n1 neoverse-n2 neoverse-v1 neoverse-v2 grace neoverse-v3 neoverse-v3ae neoverse-n3 olympus cortex-a725 cortex-x925 qdf24xx saphira phecda xgene1 vulcan octeontx octeontx81 octeontx83 octeontx2 octeontx2t98 octeontx2t96 octeontx2t93 octeontx2f95 octeontx2f95n octeontx2f95mm a64fx fujitsu-monaka thunderx thunderxt88 thunderxt88p1 thunderxt81 tsv110 thunderxt83 thunderx2t99 thunderx3t110 zeus cortex-a57.cortex-a53 cortex-a72.cortex-a53 cortex-a73.cortex-a35 cortex-a73.cortex-a53 cortex-a75.cortex-a55 cortex-a76.cortex-a55 cortex-r82 cortex-r82ae cortex-x1 cortex-x1c cortex-x2 cortex-x3 cortex-x4 cortex-a510 cortex-a520 cortex-a520ae cortex-a710 cortex-a715 cortex-a720 cortex-a720ae ampere1 ampere1a ampere1b cobalt-100 apple-m1 apple-m2 apple-m3 native. cortex-a57.cortex-a53 cortex-a72.cortex-a53 cortex-a73.cortex-a35 cortex-a73.cortex-a53 cortex-a75.cortex-a55 cortex-a76.cortex-a55 apple-m1 apple-m2 apple-m3 gb10 GCC big.LITTLE . neoverse-512tvb GCC Neoverse () SVE () . GCC Neoverse Advanced SIMD SVE ( SVE SVE ). Neoverse V1 . / AArch64 native . . -mtune= -mcpu= -march= . . -mcpu=name . -mcpu=cpu{+[no]feature}* cpu -mtune . feature aarch64-feature-modifiers,,-march and -mcpu Feature Modifiers . . GCC name ( -march) ( -mtune) . -march -mtune . -mcpu=neoverse-512tvb Neoverse () SVE () . -march -mcpu=neoverse-512tvb Neoverse V1 Neoverse V1 Neoverse . -mtune -mcpu=neoverse-512tvb -mtune=neoverse-512tvb . -moverride=string (back-end) -mtune= . (syntax) string . GCC . -mverbose-cost-dump (dump) . . -mpc-relative-literal-loads -mno-pc-relative-literal-loads PC ( ) . (literal pools) . 1MB . -mcmodel=tiny . -msign-return-address=scope . : none non-leaf (leaf) all . none . -mbranch-protection . -mbranch-protection=none|standard|pac-ret[+leaf+b-key]|bti|gcs . none . standard . standard . pac-ret[+leaf] : ( ) a-key. leaf . b-key B A . bti (Branch Target Identification) . gcs (Guarded Control Stack) . -mharden-sls=opts (SLS - straight line speculation) . opts : retbr blr -mharden-sls=all SLS -mharden-sls=none SLS . . (spill-free) . (strided multi-register) LD1 ST1 SME2 . scope : all strided none . -mearly-ra=all -O2 -Os . -mearly-ra=none . -mearly-ldp-fusion load/store AArch64 . -O . -mlate-ldp-fusion load/store AArch64 . -O . -msve-vector-bits=bits SVE . SVE . GCC SVE : << >> (vector-length agnostic) << >> (vector-length specific) GCC . bits : scalable 128 256 512 1024 2048. scalable . -msve-vector-bits=128 big-endian . . SVE scalable . -msve-vector-bits=scalable . -Wexperimental-fmv-target (Function Multi Versioning) . (Arm C Language Extension) Function Multi Versioning . FMV . -march -mcpu -march -mcpu nofeature : crc CRC . -march=armv8.1-a . crypto Crypto . Advanced SIMD . fp . -march -mcpu . simd Advanced SIMD . . -march -mcpu . sve Scalable Vector Extension . Advanced SIMD . lse Large System Extension . -march=armv8.1-a . rdma Round Double Multiply Accumulate . -march=armv8.1-a . fp16 FP16 . . fp16fml FP16 fmla . FP16 . -march=armv8.4-a . Armv8.2-A . rcpc RCpc . LDAPR load-acquire (inline asm) RCpc . dotprod Dot Product . Advanced SIMD . aes aes pmull Armv8-a . Advanced SIMD . sha2 sha2 Armv8-a . Advanced SIMD . sha3 sha512 sha3 . Advanced SIMD . Armv8.2-A . sm4 sm3 sm4 . Advanced SIMD . Armv8.2-A . profile Statistical Profiling . . rng Armv8.5-a . . memtag (Memory Tagging Extensions) Armv8.5-a . Armv8.5-A . sb Speculation Barrier Armv8-a . . -march=armv8.5-a . ssbs Speculative Store Bypass Safe Armv8-a . . -march=armv8.5-a . predres Execution and Data Prediction Restriction Armv8-a . . -march=armv8.5-a . sve2 Scalable Vector Extension 2 Armv8-a . SVE . sve2-bitperm SVE2 bitperm . SVE2 . sve2-sm4 SVE2 sm4 . SVE2 . sve2-aes SVE2 aes . SVE2 . sve2-sha3 SVE2 sha3 . SVE2 . sve2p1 SVE2.1 . SVE2 . tme Transactional Memory Extension . i8mm . Advanced SIMD . -march=armv8.6-a . Armv8.2-A . f32mm . SVE . Armv8.2-A . f64mm . SVE . Armv8.2-A . bf16 (brain half-precision) . Advanced SIMD . -march=armv8.6-a . Armv8.2-A . ls64 load store . mops "memcpy" "memmove" "memset" . -march=armv8.8-a . flagm (Flag Manipulation instructions Extension) . flagm2 FlagM2 ..IP pauth 4 Pointer Authentication. cssc Common Short Sequence Compression. sme Scalable Matrix Extension. SVE2 . sme-i16i64 FEAT_SME_I16I64 SME. SME . sme-f64f64 FEAT_SME_F64F64 SME. SME . sme2 Scalable Matrix Extension 2. SME . sme-b16b16 FEAT_SME_B16B16 SME. SME2 SVE_B16B16 . sme-f16f16 FEAT_SME_F16F16 SME. SME2 . sme2p1 . Scalable Matrix Extension. SME2 . fcma SIMD (complex number). jscvt "fjcvtzs". frintts . wfxt "wfet" "wfit". xs XS. lse128 LSE128. LSE . d128 / . LSE128 . gcs Guarded Control Stack Armv9.4-a. the (translation hardening) Armv8.9-a/9.4-a. rcpc2 RCpc2. rcpc3 RCpc3 ( - Release Consistency). fp8 fp8 ( ). fp8fma (multiply accumulate) (fp8). ssve-fp8fma (fp8) (streaming mode). fp8dot4 fp8 ( ) (single-precision). ssve-fp8dot4 fp8 ( ) (streaming mode). fp8dot2 fp8 ( ) (half-precision). ssve-fp8dot2 fp8 ( ) (streaming mode). faminmax / (Floating Point Absolute Maximum/Minimum). lut (Lookup Table). cpa (Checked Pointer Arithmetic). sve-b16b16 SVE ("bf16"). "sve2" "sme2" . crypto aes sha2 simd fp . nofp nosimd nocrypto noaes nosha2 . Adapteva Epiphany -m Adapteva Epiphany : -mhalf-reg-file "r32"..."r63" . . -mprefer-short-insn-regs . . -mbranch-cost=num num <<>> . () . -mcmove (conditional moves). -mnops=num num NOP . -mno-soft-cmpsf "fsub" . NaN . -msoft-cmpsf IEEE . -mstack-offset=num (offset) . "sp+0...sp+7" (leaf functions) . 8 16 . ABI . (toolchain) --with-stack-offset=num . -mno-round-nearest (truncating) . -mround-nearest . -mlong-calls "b" / "bl" ( ) . . -mshort-calls "b" / "bl" . -mlong-calls . -msmall16 . -mlong-calls . -mfp-mode=mode . . . mode : caller . FPU (object file) . truncate ( ) . ..IP round-nearest 4 (round-to-nearest-or-even) . int FPU (multiply-and-accumulate) . -mfp-mode=caller . -mno-split-lohi -mno-postinc -mno-postmodify (post-increment) (post-modify) . msplit-lohi -mpost-inc -mpost-modify. -mnovect-double SIMD SImode . -mvect-double DImode SIMD . -max-vect-align=num (alignment) SIMD. num . . ABI SIMD / . -msplit-vecmove-early reload . . -m1reg-reg -1 . reg r43 r63 none . -m1reg-none . AMD GCN AMD GCN . -march=gpu -mtune=gpu (tuning) gpu . gpu : gfx900 GCN5 Vega 10 (gfx900). gfx902 GCN5 Vega gfx902. () gfx904 GCN5 Vega gfx904. () gfx906 GCN5 Vega 20 (gfx906). gfx908 CDNA1 Instinct MI100 (gfx908). gfx909 GCN5 Vega gfx909. () gfx90a CDNA2 Instinct MI200 (gfx90a). gfx90c GCN5 Vega 7 (gfx90c). gfx9-generic Vega GFX9: gfx900 gfx902 gfx904 gfx906 gfx909 gfx90c. () gfx1030 RDNA2 gfx1030 ( GFX10). gfx1031 RDNA2 gfx1031 ( GFX10). () gfx1032 RDNA2 gfx1032 ( GFX10). () gfx1033 RDNA2 gfx1033 ( GFX10). () gfx1034 RDNA2 gfx1034 ( GFX10). () gfx1035 RDNA2 gfx1035 ( GFX10). () gfx1036 RDNA2 gfx1036 ( GFX10). gfx10-3-generic GFX10-3 gfx1030 gfx1031 gfx1032 gfx1033 gfx1034 gfx1035 gfx1036. () gfx1100 RDNA3 gfx1100 ( GFX11). gfx1101 RDNA3 gfx1101 ( GFX11). () gfx1102 RDNA3 gfx1102 ( GFX11). () gfx1103 RDNA3 gfx1103 ( GFX11). gfx1150 RDNA3 gfx1150 ( GFX11). () gfx1151 RDNA3 gfx1151 ( GFX11). () gfx1152 RDNA3 gfx1152 ( GFX11). () gfx1153 RDNA3 gfx1153 ( GFX11). () gfx11-generic GFX11 gfx1100 gfx1101 gfx1102 gfx1103 gfx1150 gfx1151 gfx1152 gfx1153. () -msram-ecc=on -msram-ecc=off -msram-ecc=any SRAM-ECC . . . any . -mstack-size=bytes (bytes) GPU (wave-front) . . . OpenACC OpenMP 32KB 1MB . -mxnack=on -mxnack=off -mxnack=any XNACK . XNACK XNACK . . Unified Shared Memory -mxnack=any -mxnack=no . ARC : -mbarrel-shifter barrel shifter . -mcpu=ARC601 -mcpu=ARCEM . -mjli-always jli_s . ARCv2 . -mcpu=cpu cpu . . cpu : ARC600. : -mA6 -mARC600. arc601 ARC601. : -mARC601. arc700 ARC700. : -mA7 -mARC700. --with-cpu=arc700 . arcem ARC EM. archs ARC HS. em ARC EM . em4 ARC EM4. em4_dmips ARC EM4 DMIPS. em4_fpus ARC EM4 DMIPS (single-precision). em4_fpuda ARC EM4 DMIPS (double assist). hs ARC HS (atomic). hs34 ARC HS34. hs38 ARC HS38. hs38_linux ARC HS38 . hs4x ARC HS4x. hs4xd ARC HS4xD. hs4x_rel31 ARC HS4x 3.10a. arc600_norm ARC 600 "norm". arc600_mul32x16 ARC 600 "norm" . arc600_mul64 ARC 600 "norm" "mul64". arc601_norm ARC 601 "norm". arc601_mul32x16 ARC 601 "norm" . arc601_mul64 ARC 601 "norm" "mul64". nps400 ARC 700 NPS400. em_mini ARC EM . -mdpfp -mdpfp-compact FPX (double-precision) (compact). -mdpfp-fast FPX (fast). -mno-dpfp-lrsr "lr" "sr" (aux) FPX. -mea . "divaw" "adds" "subs" "sat16" . -mcpu=ARC700 . -mno-mpy "mpy" ARC700 . . -mmul32x16 - (multiply-accumulate) . -mmul64 "mul64" "mulu64". -mcpu=ARC600 . -mnorm "norm". -mcpu=ARC700 . -mspfp -mspfp-compact FPX (single-precision) (compact). -mspfp-fast FPX (fast). -msimd ARC SIMD (builtins) . -mcpu=ARC700 . -msoft-float . FPX -mspfp -mspfp-compact -mspfp-fast -mdpfp -mdpfp-compact -mdpfp-fast . -mswap "swap". -matomic / (locked load/store conditional) . ARC 6xx ARC EM . -mdiv-rem "div" "rem" ARCv2. -mcode-density (code density) ARC EM. ARC HS . -mll64 / ARC HS. -mtp-regno=regno (thread pointer). -mmpy-option=multo ARCv2 . multo . wlh1 . : 0 none . 1 w (pipelined). : "mpyw" "mpyuw". 2 wlh1 ( ). : "mpy" "mpyu" "mpym" "mpymu" "mpy_s". 3 32x32 ( ). : "mpy" "mpyu" "mpym" "mpymu" "mpy_s". 4 wlh3 16x16 . : "mpy" "mpyu" "mpym" "mpymu" "mpy_s". 5 wlh4 16x16 . : "mpy" "mpyu" "mpym" "mpymu" "mpy_s". 6 wlh5 32x4 . : "mpy" "mpyu" "mpym" "mpymu" "mpy_s". 7 plus_dmpy ARC HS SIMD. 8 plus_macd ARC HS SIMD. 9 plus_qmacw ARC HS SIMD. ARCv2 . -mfpu=fpu ARCv2 . fpu : fpus . fpud . . ARC EM . fpuda . . ARC EM . fpuda_div . . ARC EM . fpuda_fma . (fused multiply and add) . ARC EM . fpuda_all . . ARC EM . fpus_div . fpud_div . fpus_div . ARC EM . fpus_fma . fpud_fma . fpus_fma . ARC EM . fpus_all . fpud_all . ARC EM . -mirq-ctrl-saved=register-range, blink, lp_count / . register-range . "r0" "fp" . blink lp_count . ARC EM ARC HS . -mrgf-banked-regs=number . (P0) . PC STATUS32 . ARC V2 . 4 8 16 32. -mlpc-width=width "lp_count" . width 8 16 20 24 28 32 . 32 . 32 (zero-delay loop) "lp_count" . . "__ARC_LPC_WIDTH__" width . -mrf16 . "__ARC_RF16__" . -mbranch-index "bi" "bih" . . -mdsp-packa DSP Pack A . "__Xdsp_packa" . . -mdvbf dual Viterbi butterfly . "__Xdvbf" . . -mlock / (locked load/store conditional) . "__Xlock" . -mmac-d16 . "__Xxmac_d16" . . -mmac-24 . "__Xxmac_24" . . -mrtsc . "__Xrtsc" . . -mswape (swap byte ordering) . "__Xswape" ..IP -mtelephony 4 (telephony) . "__Xtelephony" . . -mxy XY . "__Xxy" . : -misize . -mannotate-align . . : -marclinux "arclinux" . "arc-linux-uclibc" "arceb-linux-uclibc" . -marclinux_prof "arclinux_prof" . "arc-linux-uclibc" "arceb-linux-uclibc" . : -mlong-calls . -mmedium-calls (branch-and-link) . . "arc-linux-uclibc" "arceb-linux-uclibc" . -G num num . num ARC / . -mno-sdata sdata . "arc-linux-uclibc" "arceb-linux-uclibc" . -mvolatile-cache volatile . . -mno-volatile-cache (cache bypass) volatile . : -malign-call . . -mauto-modify-reg / . -mbbit-peephole . . -mno-brcc arc_reorg ("brcc") . combiner . -mcase-vector-pcrel PC . -Os . -mcompact-casesi "casesi" . -Os ARCv1 . . -mno-cond-exec ARCompact . (delay slot) ARC . . -mmedium-calls . -mearly-cbranchsi "cbranchsi" reload . -mexpand-adddi "adddi3" "subdi3" RTL "add.f" "adc" . . -mindexed-loads . . -mlra . . -mlra-priority-none . -mlra-priority-compact r0..r3 / r12..r15 . -mlra-priority-noncompact r0..r3 / r12..r15. -mmillicode ( -Os) libgcc millicode . millicode . -mcode-density-frame "enter" "leave" . code-density . -mmixed-code . . -mq-class . q . -Os . -mRcq . . -mRcw . . -msize-level=level . level : 0 . 1 . 1 . 2 . 3 Os . -Os 3 . 1 . -mtune=cpu cpu -mcpu= . cpu : ARC600 ARC600. ARC601 ARC601. ARC700 ARC700 . ARC700-xmac ARC700 XMAC. ARC725D ARC725D..IP ARC750D 4 ARC750D. core3 core3 ARCv2. "dbnz" . release31a 3.10a ARC4x. -mmultcost=num 4 . -munalign-prob-threshold=probability . . : -margonaut FPX . -mbig-endian -EB big-endian. . big-endian GCC "arceb-elf32" "arceb-linux-uclibc" big endian . -mlittle-endian -EL little-endian. . little-endian GCC "arc-elf32" "arc-linux-uclibc" little endian . -mbarrel_shifter -mbarrel-shifter . -mdpfp_compact -mdpfp-compact . -mdpfp_fast -mdpfp-fast . -mdsp_packa -mdsp-packa . -mEA -mea . -mmac_24 -mmac-24 . -mmac_d16 -mmac-d16 . -mspfp_compact -mspfp-compact . -mspfp_fast -mspfp-fast . -mtune=cpu arc600 arc601 arc700 arc700-xmac cpu ARC600 ARC601 ARC700 ARC700-xmac . -multcost=num -mmultcost . ARM (ARM Options) -m ARM : -mabi=name ABI . : apcs-gnu atpcs aapcs aapcs-linux iwmmxt. -mapcs-frame (stack frame) (ARM Procedure Call Standard) . -fomit-frame-pointer (leaf functions) . -mno-apcs-frame . . -mapcs -mapcs-frame . -mthumb-interwork ARM Thumb . (pre-v5) . -mno-thumb-interwork -mthumb-interwork . AAPCS . -mno-sched-prolog (prologue) . ( ) . -msched-prolog . -mfloat-abi=name ABI . : soft softfp hard. soft GCC . softfp soft-float . hard FPU . . ABI hard-float soft-float (link) ABI . -mgeneral-regs-only . Advanced SIMD . -mlittle-endian little-endian . . -mbig-endian big-endian little-endian . -mbe8 -mbe32 big-endian BE8 BE32 . little-endian . . ARMv6 BE8 BE32 . BE32 ARM . -march=name[+extension...] ARM . GCC . -mcpu= . : armv4t armv5t armv5te armv6 armv6j armv6k armv6kz armv6t2 armv6z armv6zk armv7 armv7-a armv7ve armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8.6-a armv9-a armv7-r armv8-r armv6-m armv6s-m armv7-m armv7e-m armv8-m.base armv8-m.main armv8.1-m.main iwmmxt iwmmxt2. Thumb : armv4. . +extension . . . +crypto +simd . +no... : . -march=armv7-a+simd+nofp+vfpv4 -march=armv7-a+vfpv4 +simd +nofp . . +simd armv7-a armv8-a Advanced SIMD (Neon) ARMv7-A armv7-a ARMv8-A armv8-a . . . armv6 armv6j armv6k armv6kz armv6t2 armv6z armv6zk +fp VFPv2. +vfpv2 . +nofp . armv7 ARMv7-A ARMv7-R ARMv7-M. +fp VFPv3 (double-precision). +vfpv3-d16 . ARMv7-M ARMv7-A ARMv7-R . +nofp . armv7-a +mp (multiprocessing). +sec . +fp VFPv3 . +vfpv3-d16 . +simd Advanced SIMD (Neon) v1 VFPv3. +neon +neon-vfpv3 . +vfpv3 VFPv3 . +vfpv3-d16-fp16 VFPv3 (half-precision). +vfpv3-fp16 VFPv3 (half-precision). +vfpv4-d16 VFPv4 . +vfpv4 VFPv4 . +neon-fp16 Advanced SIMD (Neon) v1 VFPv3 . +neon-vfpv4 Advanced SIMD (Neon) v2 VFPv4. +nosimd Advanced SIMD ( ). +nofp Advanced SIMD. armv7ve ARMv7-A . +fp VFPv4 . +vfpv4-d16 . +simd Advanced SIMD (Neon) v2 VFPv4. +neon-vfpv4 . +vfpv3-d16 VFPv3 . +vfpv3 VFPv3 . +vfpv3-d16-fp16 VFPv3 . +vfpv3-fp16 VFPv3 . +vfpv4-d16 VFPv4 . +vfpv4 VFPv4 . +neon Advanced SIMD (Neon) v1 VFPv3. +neon-vfpv3 . +neon-fp16 Advanced SIMD (Neon) v1 VFPv3 . +nosimd Advanced SIMD ( ). +nofp Advanced SIMD. armv8-a +crc (CRC). +simd Advanced SIMD ARMv8-A. +crypto . +nocrypto . +nofp Advanced SIMD . +sb (Speculation Barrier). +predres (Execution and Data Prediction Restriction). armv8.1-a +simd Advanced SIMD ARMv8.1-A. +crypto . Advanced SIMD . +nocrypto ..IP +nofp 4 Advanced SIMD . +sb (Speculation Barrier). +predres . armv8.2-a armv8.3-a +fp16 (half-precision). Advanced SIMD . +fp16fml fmla . Advanced SIMD . +simd Advanced SIMD ARMv8.1-A. +crypto . Advanced SIMD . +dotprod Dot Product. Advanced SIMD . +nocrypto . +nofp Advanced SIMD . +sb (Speculation Barrier). +predres . +i8mm -. Advanced SIMD . +bf16 Brain. Advanced SIMD . armv8.4-a +fp16 . Advanced SIMD Dot Product fmla . +simd Advanced SIMD ARMv8.3-A Dot Product. +crypto . Advanced SIMD Dot Product . +nocrypto . +nofp Advanced SIMD . +sb (Speculation Barrier). +predres . +i8mm -. Advanced SIMD . +bf16 Brain. Advanced SIMD . armv8.5-a +fp16 . Advanced SIMD Dot Product fmla . +simd Advanced SIMD ARMv8.3-A Dot Product. +crypto . Advanced SIMD Dot Product . +nocrypto . +nofp Advanced SIMD . +i8mm -. Advanced SIMD . +bf16 Brain. Advanced SIMD . armv8.6-a +fp16 . Advanced SIMD Dot Product fmla . +simd Advanced SIMD ARMv8.3-A Dot Product. +crypto . Advanced SIMD Dot Product . +nocrypto . +nofp Advanced SIMD . +i8mm -. Advanced SIMD . +bf16 Brain. Advanced SIMD . armv7-r +fp.sp VFPv3 (single-precision). +vfpv3xd . +fp VFPv3 (double-precision). +vfpv3-d16 . +vfpv3xd-d16-fp16 VFPv3 . +vfpv3-d16-fp16 VFPv3 . +nofp . +idiv ARM-state..IP +noidiv 4 ARM . armv7e-m +fp VFPv4 (single-precision). +fpv5 FPv5 . +fp.dp FPv5 (double-precision). +nofp . armv8.1-m.main +dsp DSP. +mve M-Profile Vector Extension (MVE). +mve.fp M-Profile Vector Extension (MVE). +fp . +fp.dp . +nofp . +cdecp0, +cdecp1, ... , +cdecp7 (CDE) (coprocessors) . +pacbti (PACBTI) . armv8-m.main +dsp DSP. +nodsp DSP . +fp . +fp.dp . +nofp . +cdecp0, +cdecp1, ... , +cdecp7 (CDE) . armv8-r +crc (CRC). +fp.sp FPv5 . +simd Advanced SIMD ARMv8-A. +crypto . +nocrypto . +nofp Advanced SIMD . -march=native . GNU/Linux . . -march=unset -march=... . (CPU) . -mtune=name ARM GCC (tune) . ARM . : arm7tdmi arm7tdmi-s arm710t arm720t arm740t strongarm strongarm110 strongarm1100 strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s arm1156t2f-s arm1176jz-s arm1176jzf-s generic-armv7-a cortex-a5 cortex-a7 cortex-a8 cortex-a9 cortex-a12 cortex-a15 cortex-a17 cortex-a32 cortex-a35 cortex-a53 cortex-a55 cortex-a57 cortex-a72 cortex-a73 cortex-a75 cortex-a76 cortex-a76ae cortex-a77 cortex-a78 cortex-a78ae cortex-a78c cortex-a710 ares cortex-r4 cortex-r4f cortex-r5 cortex-r7 cortex-r8 cortex-r52 cortex-r52plus cortex-m0 cortex-m0plus cortex-m1 cortex-m3 cortex-m4 cortex-m7 cortex-m23 cortex-m33 cortex-m35p cortex-m52 cortex-m55 cortex-m85 cortex-x1 cortex-x1c cortex-m1.small-multiply cortex-m0.small-multiply cortex-m0plus.small-multiply exynos-m1 marvell-pj4 neoverse-n1 neoverse-n2 neoverse-v1 xscale iwmmxt iwmmxt2 ep9312 fa526 fa626 fa606te fa626te fmp626 fa726te star-mc1 xgene1. GCC big.LITTLE . : cortex-a15.cortex-a7 cortex-a17.cortex-a7 cortex-a57.cortex-a53 cortex-a72.cortex-a53 cortex-a72.cortex-a35 cortex-a73.cortex-a53 cortex-a75.cortex-a55 cortex-a76.cortex-a55. -mtune=generic-arch GCC arch . . GCC . -mtune -mcpu . -mtune=native . GNU/Linux . . -mcpu=name[+extension...] ARM . GCC ARM ( -march ) ARM ( -mtune ) . -march -mtune . . . . Advanced SIMD (Neon) -mfloat-abi -mfpu : Advanced SIMD -mfloat-abi soft -mfpu auto SIMD (override) . cortex-a9 : Advanced SIMD. +nosimd +nofp SIMD SIMD . -mtune . : DSP cortex-m33 cortex-m35p cortex-m52 cortex-m55 cortex-m85 . M (MVE) cortex-m52 cortex-m55 cortex-m85 . +nopacbti (Pointer Authentication and Branch Target Identification Extension) cortex-m52 cortex-m85 . +nomve M (MVE) cortex-m52 cortex-m55 cortex-m85 . +nomve.fp M (MVE) cortex-m52 cortex-m55 cortex-m85 . +cdecp0, +cdecp1, ... , +cdecp7 (CDE) cortex-m52 cortex-m55 star-mc1 . +nofp arm9e arm946e-s arm966e-s arm968e-s arm10e arm1020e arm1022e arm926ej-s arm1026ej-s cortex-r5 cortex-r7 cortex-r8 cortex-m4 cortex-m7 cortex-m33 cortex-m35p cortex-m52 cortex-m55 cortex-m85 . SIMD generic-armv7-a cortex-a5 cortex-a7 cortex-a8 cortex-a9 cortex-a12 cortex-a15 cortex-a17 cortex-a15.cortex-a7 cortex-a17.cortex-a7 cortex-a32 cortex-a35 cortex-a53 cortex-a55 . +nofp.dp cortex-r5 cortex-r7 cortex-r8 cortex-r52 cortex-r52plus cortex-m7 . +nosimd SIMD ( ) generic-armv7-a cortex-a5 cortex-a7 cortex-a9 . +crypto cortex-a32 cortex-a35 cortex-a53 cortex-a55 cortex-a57 cortex-a72 cortex-a73 cortex-a75 exynos-m1 xgene1 cortex-a57.cortex-a53 cortex-a72.cortex-a53 cortex-a73.cortex-a35 cortex-a73.cortex-a53 cortex-a75.cortex-a55 . generic-armv7-a VFPv3 . : mp sec vfpv3-d16 vfpv3 vfpv3-d16-fp16 vfpv3-fp16 vfpv4-d16 vfpv4 neon neon-vfpv3 neon-fp16 neon-vfpv4. -march=armv7-a . -mcpu=generic-arch -march=arch -mtune=generic-arch . -mtune . -mcpu=native . GNU/Linux . . -mcpu=unset -mcpu=... . CPU . -mfpu=name ( ) . : auto vfpv2 vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16 vfpv3xd vfpv3xd-fp16 neon-vfpv3 neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16 neon-vfpv4 fpv5-d16 fpv5-sp-d16 fp-armv8 neon-fp-armv8 crypto-neon-fp-armv8. neon neon-vfpv3 vfp vfpv2 . auto . Advanced SIMD -mcpu -march . NEON ( -mfpu=neon) GCC -funsafe-math-optimizations . NEON IEEE 754 ( /denormal ) NEON . fpu target("fpu=") pragma . -mfp16-format=name "__fp16" . none ieee alternative none "__fp16" . -mstructure-size-boundary=n (structures) (unions) . . . COFF . ABI . . . . . -mabort-on-noreturn "abort" "noreturn" . . -mlong-calls -mno-long-calls . . (long calls) . (static) "short_call" "#pragma no_long_calls" . (weak) "long_call" "section" "#pragma long_calls" . . -mno-long-calls "#pragma long_calls_off". . -msingle-pic-base PIC (prologue) . . -mpic-register=reg PIC . PIC . PIC EABI (stack- checking) R9 R10 . -mpic-data-is-text-relative (text) (data) . PC . VxWorks RTP . -msingle-pic-base . -mpoke-function-name . : t0 .ascii "arm_poke_function_name", 0 .align t1 .word 0xff000000 + (t1 - t0) arm_poke_function_name mov ip, sp stmfd sp!, {fp, ip, lr, pc} sub fp, ip, #4 (stack backtrace) "pc" "fp + 0" . "pc - 12" "((pc[-3]) & 0xff000000)" ..IP -mthumb 4 -marm ARM Thumb . ARM GCC --with-mode=state . ARM Thumb (pragmas) target("thumb") target("arm") . -mflip-thumb ARM/Thumb . Thumb/ARM . -mtpcs-frame (stack frame) Thumb (Thumb Procedure Call Standard) (non-leaf). ( .) -mno-tpcs-frame . -mtpcs-leaf-frame Thumb . ( .) -mno-apcs-leaf-frame . -mcallee-super-interworking (externally visible) ARM Thumb . -interworking . AAPCS interworking . -mcaller-super-interworking ( ) interworking . . AAPCS interworking . -mtp=name (TLS). soft "__aeabi_read_tp" . tpidrurw tpidruro tpidrprw ( arm6k ). CP15 cp15 tpidruro . auto . auto . -mtls-dialect=dialect (dialect) . dialect : gnu gnu2. gnu GNU TLS . gnu2 GNU . GNU . TLS (initial exec) (local exec) . -mword-relocations (word-sized) ( R_ARM_ABS32) . (uClinux SymbianOS) -fpic -fPIC . -mslow-flash-data . -mfix-cortex-m3-ldrd Cortex-M3 "ldrd" . . -mcpu=cortex-m3 . -mfix-cortex-a57-aes-1742098 -mno-fix-cortex-a57-aes-1742098 -mfix-cortex-a72-aes-1655431 -mno-fix-cortex-a72-aes-1655431 ( ) (erratum) Cortex-A57 Cortex-A72 AES . -mcpu=cortex-a57 -mcpu=cortex-a72 . -munaligned-access -mno-unaligned-access ( ) . ARMv6 ARMv6-M ARMv8-M Baseline . (packed) . ARM "Tag_CPU_unaligned_access" true false . "__ARM_FEATURE_UNALIGNED" . -mneon-for-64bits . -mslow-flash-data (literal) . ARMv7 M-profile . -mword-relocations . -masm-syntax-unified (unified asm syntax) . (divided syntax) . Thumb2 GCC . . -mrestrict-it IT ARMv8-A . IT . ARMv8-A Thumb . -mprint-tune-info . . . -mverbose-cost-dump . . -mpure-code . ELF text ELF "SHF_ARM_PURECODE" . -pic M-profile . -mcmse <> . -mfix-cmse-cve-2021-35465 "VLLDM" M-profile CMSE (CVE-2021-365465). -mcpu= "cortex-m33" "cortex-m35p" "cortex-m52" "cortex-m55" "cortex-m85" "star-mc1" . -mno-fix-cmse-cve-2021-35465 . -mstack-protector-guard=guard -mstack-protector-guard-offset=offset guard. global tls TLS. -mstack-protector-guard-offset= -fstack-protector-guard=tls . -mfdpic -mno-fdpic ABI FDPIC . "arm-*-uclinuxfdpiceabi" PIC/PIE -fPIE . FDPIC PIC/PIE . . -static -Wl,-dynamic-linker . -mno-fdpic Linux ("arm-*-uclinuxfdpiceabi") ( ) . -mbranch-protection=none|standard|pac-ret[+leaf][+bti]|bti[+pac-ret[+leaf]] ( armv8.1-m.main). none . standard[+leaf] . pac-ret[+leaf] . leaf . +bti landing-pad . +pacbti architectural-NOP . PACBTI . BTI -mbranch-protection=bti . none armv8-m.main . ..PP AVR AVR : -mmcu=mcu (ISA) AVR . "avr2" . ISA AVR . : "crtmcu.o" "avr/io*.h" "libmcu.a" device-specs ("https://gcc.gnu.org/wiki/avr-gcc#spec-files") "specs-mcu" . "mcu" . AVR-LibC ("https://github.com/avrdudes/avr-libc") "atpack" ("https://gcc.gnu.org/wiki/avr-gcc#atpack") . "avr2" <> 8 KiB . mcu = "attiny22", "attiny26", "at90s2313", "at90s2323", "at90s2333", "at90s2343", "at90s4414", "at90s4433", "at90s4434", "at90c8534", "at90s8515", "at90s8535". "avr25" <> 8 KiB "MOVW". mcu = "attiny13", "attiny13a", "attiny24", "attiny24a", "attiny25", "attiny261", "attiny261a", "attiny2313", "attiny2313a", "attiny43u", "attiny44", "attiny44a", "attiny45", "attiny48", "attiny441", "attiny461", "attiny461a", "attiny4313", "attiny84", "attiny84a", "attiny85", "attiny87", "attiny88", "attiny828", "attiny841", "attiny861", "attiny861a", "ata5272", "ata6616c", "at86rf401". "avr3" <> 16 KiB 64 KiB . mcu = "at76c711", "at43usb355". "avr31" <> 128 KiB . mcu = "atmega103", "at43usb320". "avr35" <> 16 KiB 64 KiB "MOVW". mcu = "attiny167", "attiny1634", "atmega8u2", "atmega16u2", "atmega32u2", "ata5505", "ata6617c", "ata664251", "at90usb82", "at90usb162". "avr4" <> 8 KiB . mcu = "atmega48", "atmega48a", "atmega48p", "atmega48pa", "atmega48pb", "atmega8", "atmega8a", "atmega8hva", "atmega88", "atmega88a", "atmega88p", "atmega88pa", "atmega88pb", "atmega8515", "atmega8535", "ata5795", "ata6285", "ata6286", "ata6289", "ata6612c", "at90pwm1", "at90pwm2", "at90pwm2b", "at90pwm3", "at90pwm3b", "at90pwm81". "avr5" <> 16 KiB 64 KiB . mcu = "atmega16", "atmega16a", "atmega16hva", "atmega16hva2", "atmega16hvb", "atmega16hvbrevb", "atmega16m1", "atmega16u4", "atmega161", "atmega162", "atmega163", "atmega164a", "atmega164p", "atmega164pa", "atmega165", "atmega165a", "atmega165p", "atmega165pa", "atmega168", "atmega168a", "atmega168p", "atmega168pa", "atmega168pb", "atmega169", "atmega169a", "atmega169p", "atmega169pa", "atmega32", "atmega32a", "atmega32c1", "atmega32hvb", "atmega32hvbrevb", "atmega32m1", "atmega32u4", "atmega32u6", "atmega323", "atmega324a", "atmega324p", "atmega324pa", "atmega324pb", "atmega325", "atmega325a", "atmega325p", "atmega325pa", "atmega328", "atmega328p", "atmega328pb", "atmega329", "atmega329a", "atmega329p", "atmega329pa", "atmega3250", "atmega3250a", "atmega3250p", "atmega3250pa", "atmega3290", "atmega3290a", "atmega3290p", "atmega3290pa", "atmega406", "atmega64", "atmega64a", "atmega64c1", "atmega64hve", "atmega64hve2", "atmega64m1", "atmega64rfr2", "atmega640", "atmega644", "atmega644a", "atmega644p", "atmega644pa", "atmega644rfr2", "atmega645", "atmega645a", "atmega645p", "atmega649", "atmega649a", "atmega649p", "atmega6450", "atmega6450a", "atmega6450p", "atmega6490", "atmega6490a", "atmega6490p", "ata5790", "ata5790n", "ata5791", "ata6613c", "ata6614q", "ata5782", "ata5831", "ata8210", "ata8510", "ata5787", "ata5835", "ata5700m322", "ata5702m322", "at90pwm161", "at90pwm216", "at90pwm316", "at90can32", "at90can64", "at90scr100", "at90usb646", "at90usb647", "at94k", "m3000". "avr51" <> 128 KiB . mcu = "atmega128", "atmega128a", "atmega128rfa1", "atmega128rfr2", "atmega1280", "atmega1281", "atmega1284", "atmega1284p", "atmega1284rfr2", "at90can128", "at90usb1286", "at90usb1287". "avr6" <> PC (3-byte PC) 128 KiB . mcu = "atmega256rfr2", "atmega2560", "atmega2561", "atmega2564rfr2". "avrxmega2" <> 8 KiB 64 KiB . mcu = "atxmega8e5", "atxmega16a4", "atxmega16a4u", "atxmega16c4", "atxmega16d4", "atxmega16e5", "atxmega32a4", "atxmega32a4u", "atxmega32c3", "atxmega32c4", "atxmega32d3", "atxmega32d4", "atxmega32e5", "avr64da28", "avr64da28s", "avr64da32", "avr64da32s", "avr64da48", "avr64da48s", "avr64da64", "avr64da64s", "avr64db28", "avr64db32", "avr64db48", "avr64db64", "avr64dd14", "avr64dd20", "avr64dd28", "avr64dd32", "avr64du28", "avr64du32", "avr64ea28", "avr64ea32", "avr64ea48", "avr64sd28", "avr64sd32", "avr64sd48". "avrxmega3" <> 64 KiB RAM RAM. mcu = "attiny202", "attiny204", "attiny212", "attiny214", "attiny402", "attiny404", "attiny406", "attiny412", "attiny414", "attiny416", "attiny416auto", "attiny417", "attiny424", "attiny426", "attiny427", "attiny804", "attiny806", "attiny807", "attiny814", "attiny816", "attiny817", "attiny824", "attiny826", "attiny827", "attiny1604", "attiny1606", "attiny1607", "attiny1614", "attiny1616", "attiny1617", "attiny1624", "attiny1626", "attiny1627", "attiny3214", "attiny3216", "attiny3217", "attiny3224", "attiny3226", "attiny3227", "atmega808", "atmega809", "atmega1608", "atmega1609", "atmega3208", "atmega3209", "atmega4808", "atmega4809", "avr16dd14", "avr16dd20", "avr16dd28", "avr16dd32", "avr16du14", "avr16du20", "avr16du28", "avr16du32", "avr16ea28", "avr16ea32", "avr16ea48", "avr16eb14", "avr16eb20", "avr16eb28", "avr16eb32", "avr32da28", "avr32da28s", "avr32da32", "avr32da32s", "avr32da48", "avr32da48s", "avr32db28", "avr32db32", "avr32db48", "avr32dd14", "avr32dd20", "avr32dd28", "avr32dd32", "avr32du14", "avr32du20", "avr32du28", "avr32du32", "avr32ea28", "avr32ea32", "avr32ea48", "avr32sd20", "avr32sd28", "avr32sd32". "avrxmega4" <> 64 KiB 128 KiB . mcu = "atxmega64a3", "atxmega64a3u", "atxmega64a4u", "atxmega64b1", "atxmega64b3", "atxmega64c3", "atxmega64d3", "atxmega64d4", "avr128da28", "avr128da28s", "avr128da32", "avr128da32s", "avr128da48", "avr128da48s", "avr128da64", "avr128da64s", "avr128db28", "avr128db32", "avr128db48", "avr128db64". "avrxmega5" <> 64 KiB 128 KiB 64 KiB RAM. mcu = "atxmega64a1", "atxmega64a1u". "avrxmega6" <> 128 KiB . mcu = "atxmega128a3", "atxmega128a3u", "atxmega128b1", "atxmega128b3", "atxmega128c3", "atxmega128d3", "atxmega128d4", "atxmega192a3", "atxmega192a3u", "atxmega192c3", "atxmega192d3", "atxmega256a3", "atxmega256a3b", "atxmega256a3bu", "atxmega256a3u", "atxmega256c3", "atxmega256d3", "atxmega384c3", "atxmega384d3". "avrxmega7" <> 128 KiB 64 KiB RAM. mcu = "atxmega128a1", "atxmega128a1u", "atxmega128a4u". "avrtiny" Tiny <> 512 B 4 KiB . mcu = "attiny4", "attiny5", "attiny9", "attiny10", "attiny102", "attiny104", "attiny20", "attiny40". "avr1" ISA AVR . mcu = "attiny11", "attiny12", "attiny15", "attiny28", "at90s1200". -mabsdata (static storage) LDS / STS . Reduced Tiny ATtiny40 . "absdata" AVR Variable Attributes,variable attribute . -mcvt (compact vector table) . CVT : 0=Reset 1=NMI 2=Prio1 IRQ 3=Prio0 IRQs. "crtmcu.o" "crtmcu-cvt.o" . "CPUINT_CTRLA.CPUINT_CVT" CVT . "CPUINT_CTRLA.CPUINT_CVT" "__init_cvt" "libmcu.a" . "-Wl,--defsym,__init_cvt=0" . CVT AVR-LibC v2.3 ("https://github.com/avrdudes/avr-libc/issues/1010") . -mdouble=bits -mlong-double=bits ( ) "double" "long double" . bits 32 64 . bits "--with-double=" "--with-long-double=" configure ("https://gcc.gnu.org/install/configure.html#avr") . -mgas-isr-prologues (ISR) "__gcc_isr" GNU Binutils . ISR AVR Function Attributes,,"no_gccisr" . ( -Og @pxref{Optimize Options}) GNU Binutils PR21683 ("https://sourceware.org/PR21683") . -mint8 "int" . : "char" "int" "long" "long long" . C . -mmain-is-OS_task "main" . AVR Function Attributes,,"OS_task" "main" . . -mno-call-main "main" : XCALL main XJMP exit "main" ".init9" ("https://avrdudes.github.io/avr-libc/avr-libc-user-manual/mem_sections.html#sec_dot_init") . "main" . . AVR-LibC v2.3 ("https://github.com/avrdudes/avr-libc/issues/1012") . . -mno-interrupts . . -mrelax "CALL" "JMP" "RCALL" "RJMP" . -mrelax --mlink-relax --relax . (Jump relaxing) . . (linker stubs) relaxing "EIND" linker stub ..IP -mrodata-in-ram 4 -mno-rodata-in-ram ".rodata" RAM . (assertion) . AVR64* AVR128* GNU Binutils (PR31124 ("https://sourceware.org/PR31124")) ".rodata" (flash) . -mrodata-in-ram ".rodata" RAM . -mtiny-stack (stack pointer) . -mfract-convert-truncate (truncation) . -nodevicelib AVR-LibC "libmcu.a" . . AVR-LibC . (startup) : "__init_sp" ("https://github.com/avrdudes/avr-libc/issues/1011") "__stack" "__init_cvt" ("https://github.com/avrdudes/avr-libc/issues/1010") -mcvt "__call_main" ("https://github.com/avrdudes/avr-libc/issues/1012") "main" "exit" "__do_flmap_init" ("https://github.com/avrdudes/avr-libc/issues/931") FLMAP "__flmap". -nodevicespecs -specs=device-specs/specs-mcu . . (specs) -specs=path-to-specs-file . -mmcu=mcu . device-specs -B some-path "device-specs" "specs-mcu" mcu -mmcu=mcu . -Waddr-space-convert . -Wmisspelled-isr ISR ( __vector ) . . AVR . -mgas-isr-prologues -mmain-is-OS_task -mno-call-main -mrelax . -maccumulate-args / (prologue/epilogue) . push pop . -fdefer-pop Optimize Options,,optimization option . (pop ) AVR . ( printf) . -mbranch-cost=cost (branch cost) cost . cost . 0 . -mcall-prologues / . . -mfuse-add -mno-fuse-add -mfuse-add=level Tiny . -Og -O1 "level=1" "level=2" . level 0 1 2. -mfuse-move -mno-fuse-move -mfuse-move=level (post-reload) (move) . -O1 "level=3" "level=23" . level 0 ... 23 (mixed radix) 3:2:2:2 . . -mfuse-move2 (post-combine) (move) . -mstrict-X "X" . "X" (post-increment) (pre-decrement) . "X" "Y" "Z" . "X+const" "const < 64" Rn : adiw r26, const ; X += const ld , X ; = *X sbiw r26, const ; X -= const -msplit-bit-shift . -O2 -Os -Oz . -mfuse-move . -msplit-ldst . -O2 . -muse-nonzero-bits . -O2 . "EIND" Flash . (word address) (64 Ki words) . "EIND" "EICALL" "EIJMP" . : * "EIND" . * "EIND" "EICALL"/"EIJMP" "EIND" / "RET" . * "EIND" . "EIND" / (ISR) / . * goto (computed goto) (stubs) . trampolines () . / . . * (Linker relaxation) (stubs) . -mrelax --relax . (corner cases) relaxation . * "EIND = 0" . "EIND != 0" ".trampolines" (segment) "EIND" ..IP * 4 libgcc "EIND" . libgcc AVR-LibC . AVR-LibC "EIND" AVR-LibC ("https://avrdudes.github.io/avr-libc/avr-libc-user-manual") . * "EIND" ".init3" . RAM AVR-LibC "EIND" . #include static void __attribute__((section(".init3"),naked,used,no_instrument_function)) init3_set_eind (void) { __asm volatile ("ldi r24,pm_hh8(__trampolines_start)\n\t" "out %i0,r24" :: "n" (&EIND) : "r24","memory"); } "__trampolines_start" . * (stubs) : -< "gs" > ( generate stubs) : LDI r24, lo8(gs()) LDI r25, hi8(gs()) -< > . * "gs" : -< .> -< goto .> -< prologue-save -mcall-prologues> . -< switch/case. > -fno-jump-tables . -</ C ++C / .> -< ()gs .> * : int main (void) { /* Call function at word address 0x2 */ return ((int(*)(void)) 0x2)(); } ( "func_4") : int main (void) { extern int func_4 (void); /* Call function at byte address 0x4 */ return func_4(); } -Wl,--defsym,func_4=0x4 . "func_4" . "RAMPD" "RAMPX" "RAMPY" "RAMPZ" AVR KiB . KiB "RAMP" : "X" "Y" "Z" "RAMPX" "RAMPY" "RAMPZ" . "RAMPD" . * "RAMP" . * AVR Named Address Spaces, "__flash" "RAMPZ" . * RAM KiB "RAMPZ" "RAMPZ" . * "RAMP" / ISR SFR / ISR ( ) . * RAM KiB GCC AVR . "RAMP" . AVR GCC . -mmcu= . AVR AVR Named Address Spaces AVR Built-in Functions . "__AVR_ARCH__" -mmcu=mcu . : 2 25 3 31 35 4 5 51 6 mcu="avr2" "avr25" "avr3" "avr31" "avr35" "avr4" "avr5" "avr51" "avr6" 100 102 103 104 105 106 107 mcu="avrtiny" "avrxmega2" "avrxmega3" "avrxmega4" "avrxmega5" "avrxmega6" "avrxmega7". mcu . -mmcu=atmega8 4 . "__AVR_Device__" -mmcu=device . -mmcu=atmega8 "__AVR_ATmega8__" -mmcu=attiny261a "__AVR_ATtiny261A__" . "__AVR_Device__" Device AVR . Device device -mmcu=device . device avr51 . "__AVR_DEVICE_NAME__" -mmcu=device . -mmcu=atmega8 "atmega8" . device avr51 . "__AVR_CVT__" "-mcvt" . "__AVR_XMEGA__" / XMEGA . "__AVR_HAVE_ADIW__" "ADIW" "SBIW" . "__AVR_HAVE_ELPM__" "ELPM" . "__AVR_HAVE_ELPMX__" "ELPM Rn,Z" "ELPM Rn,Z+" . "__AVR_HAVE_LPMX__" "LPM Rn,Z" "LPM Rn,Z+" . "__AVR_HAVE_MOVW__" "MOVW" . "__AVR_HAVE_MUL__" . "__AVR_HAVE_JMP_CALL__" "JMP" "CALL" . KiB . "__AVR_HAVE_EIJMP_EICALL__" "__AVR_3_BYTE_PC__" "EIJMP" "EICALL" . KiB . (PC) . "__AVR_2_BYTE_PC__" (PC) . KiB . "__AVR_HAVE_8BIT_SP__" "__AVR_HAVE_16BIT_SP__" (SP) . -mtiny-stack . "__AVR_HAVE_SPH__" "__AVR_SP8__" SPH ( ) . -mmcu= -mmcu=avr2 -mmcu=avr25 -msp8 . "__AVR_HAVE_RAMPD__" "__AVR_HAVE_RAMPX__" "__AVR_HAVE_RAMPY__" "__AVR_HAVE_RAMPZ__" "RAMPD" "RAMPX" "RAMPY" "RAMPZ" . "__NO_INTERRUPTS__" -mno-interrupts . "__AVR_ERRATA_SKIP__" "__AVR_ERRATA_SKIP_JMP_CALL__" AVR ( AT90S8515 ATmega103) . "SBRS" "SBRC" "SBIS" "SBIC" "CPSE". "__AVR_HAVE_JMP_CALL__" . "__AVR_ISA_RMW__" Read-Modify-Write (--: XCH LAC LAS LAT) . "__AVR_SFR_OFFSET__=offset" I/O "IN" "OUT" "SBI" RAM "LD" "STS" . RAM I/O . "__AVR_SHORT_CALLS__" -mshort-calls . "__AVR_PM_BASE_ADDRESS__=addr" "LD*" . "__AVR_PM_BASE_ADDRESS__" . . ".rodata" RAM . "avrtiny" "avrxmega3" . "__flash" "progmem" "pgm_read_*" . "__AVR_HAVE_FLMAP__" : *< "NVMCTRL_CTRLB.FLMAP" .> AVR64* AVR128* ..IP "*" 4 GNU Binutils PR31124 ("https://sourceware.org/PR31124") . "__AVR_RODATA_IN_RAM__" . ".rodata" RAM . "__WITH_AVRLIBC__" AVR-LibC . --with-avrlibc . "__HAVE_SIGNAL_N__" signal(num) interrupt(num) AVR Function Attributes,,function attributes num . "__HAVE_DOUBLE_MULTILIB__" -mdouble= multilib . "__HAVE_DOUBLE32__" "__HAVE_DOUBLE64__" double - double - . -mdouble= . "__DEFAULT_DOUBLE__" "double" -mdouble= . "double" "__SIZEOF_DOUBLE__" . "__HAVE_LONG_DOUBLE32__" "__HAVE_LONG_DOUBLE64__" "__HAVE_LONG_DOUBLE_MULTILIB__" "__DEFAULT_LONG_DOUBLE__" "long double" "double". "__WITH_DOUBLE_COMPARISON__" "--with-double-comparison={tristate|bool|libf7}" ("https://gcc.gnu.org/install/configure.html#avr") 2 3 . "__WITH_LIBF7_LIBGCC__" "__WITH_LIBF7_MATH__" "__WITH_LIBF7_MATH_SYMBOLS__" "--with-libf7={libgcc|math|math-symbols}" ("https://gcc.gnu.org/install/configure.html#avr") . AVR (device specs) . . . ("https://gcc.gnu.org/wiki/avr-gcc#spec-files") . -mn-flash=num num KiB . "__flashN" . -mflmap "FLMAP" "NVMCTRL_CTRLB" . -mrmw -- (Read-Modify-Write) "XCH" "LAC" "LAS" "LAT" . -mshort-calls "RJMP" "RCALL" . multilib "avrxmega3" . -mskip-bug ("CPSE" "SBRS" "SBRC" "SBIS" "SBIC") -. -msp8 - . multilib "avr2" "avr25" . "SPH" . Blackfin -mcpu=cpu[-sirevision] Blackfin . cpu bf512 bf514 bf516 bf518 bf522 bf523 bf524 bf525 bf526 bf527 bf531 bf532 bf533 bf534 bf536 bf537 bf538 bf539 bf542 bf544 bf547 bf548 bf549 bf542m bf544m bf547m bf548m bf549m bf561 bf592 . sirevision Blackfin . . sirevision none . sirevision any . "__SILICON_REVISION__" . sirevision none "__SILICON_REVISION__" . sirevision any "__SILICON_REVISION__" 0xffff . sirevision GCC Blackfin . GCC cpu . bfin-elf -msim (BSP) libgloss . bf532 . bf561 . bf561 . -msim . BSP libgloss . bfin-elf . -mid-shared-library -mfdpic -msim . -momit-leaf-frame-pointer . . -mspecld-anomaly (speculative loads) . "__WORKAROUND_SPECULATIVE_LOADS" . -mno-specld-anomaly . -mcsync-anomaly CSYNC SSYNC . "__WORKAROUND_SPECULATIVE_SYNCS" . -mno-csync-anomaly CSYNC SSYNC . -mlow64k . -mno-low64k . . -mstack-check-l1 L1 uClinux . -mid-shared-library . . -fPIC . bfin-elf -msim ..IP -mno-id-shared-library 4 (ID-based) . . -mleaf-id-shared-library . . -mno-leaf-id-shared-library . . -mshared-library-id=n . 0 . -msep-data . (execute in place) . -mno-sep-data . . -mlong-calls -mno-long-calls . . . -mno-long-calls . . -mfast-fp . IEEE << >> (NAN) . -minline-plt (inlining) PLT . -mfdpic . -mmulticore (standalone) Blackfin. "__BFIN_MULTICORE" . -mcpu=bf561[-sirevision] . -mcorea -mcoreb << >> . -mcorea -mcoreb <</>> . B "coreb_main" . . -mcorea A BF561 << >>. A "__BFIN_COREA" . -mmulticore . -mcoreb B BF561 << >>. B "__BFIN_COREB" . "main" "coreb_main" . -mmulticore . -msdram SDRAM. SDRAM "__BFIN_SDRAM" . (loader) SDRAM . -micplb ICPLB . (anomaly workarounds) . Linux ICPLB . C6X -march=name . GCC . : c62x c64x c64x+ c67x c67x+ c674x. -mbig-endian (big-endian). -mlittle-endian (little-endian). . -msim . -msdata=default (static) ".neardata" "B14" . ".bss" ".neardata" . ".rodata". ".fardata" ".far" ".const" . -msdata=all "B14" . -msdata=none . ".fardata" ".far". ".const". CRIS CRIS . -march=architecture-type -mcpu=architecture-type . architecture-type v3 v8 v10 ETRAX 4 ETRAX 100 ETRAX 100 LX. v0 . -mtune=architecture-type architecture-type ABI . architecture-type -march=architecture-type . -mmax-stack-frame=n n . -metrax4 -metrax100 -metrax4 -metrax100 -march=v3 -march=v8 . -mmul-bug-workaround -mno-mul-bug-workaround "muls" "mulu" . . -mpdebug CRIS . #NO_APP . -mcc-init (condition-code) . -mno-side-effects (post-increment) . -mstack-align -mno-stack-align -mdata-align -mno-data-align -mconst-align -mno-const-align ( no-) ( ) CPU . . ABI (structure layout) ..IP -m32-bit 4 -m16-bit -m8-bit stack- data- const-align (stack frame) . . -mno-prologue-epilogue -mprologue-epilogue -mno-prologue-epilogue (prologue) (epilogue) . : (call-saved registers) . -melf (no-op). -sim - . . -sim2 -sim 0x40000000 0x80000000 . C-SKY (C-SKY Options) GCC C-SKY V2 . -march=arch C-SKY . arch : ck801 ck802 ck803 ck807 ck810. ck810 . -mcpu=cpu C-SKY . cpu : ck801 ck801t ck802 ck802t ck802j ck803 ck803h ck803t ck803ht ck803f ck803fh ck803e ck803eh ck803et ck803eht ck803ef ck803efh ck803ft ck803eft ck803efht ck803r1 ck803hr1 ck803tr1 ck803htr1 ck803fr1 ck803fhr1 ck803er1 ck803ehr1 ck803etr1 ck803ehtr1 ck803efr1 ck803efhr1 ck803ftr1 ck803eftr1 ck803efhtr1 ck803s ck803st ck803se ck803sf ck803sef ck803seft ck807e ck807ef ck807 ck807f ck810e ck810et ck810ef ck810eft ck810 ck810v ck810f ck810t ck810fv ck810tv ck810ft ck810ftv. -mbig-endian -EB -mlittle-endian -EL (big-endian) (little-endian) . . -mfloat-abi=name ABI . : soft softfp hard. soft GCC . softfp soft-float . hard FPU . . ABI hard-float soft-float ABI . -mhard-float -msoft-float . (soft float) . -mdouble-float -mno-double-float -mhard-float (double-precision) . CK803. -mfdivdu -mno-fdivdu -mhard-float "frecipd" "fsqrtd" "fdivd" . CK803. -mfpu=fpu . -mhard-float . fpu : fpv2_sf ( -mno-double-float -mno-fdivdu) fpv2 (-mdouble-float -mno-divdu) fpv2_divd (-mdouble-float -mdivdu). -melrw -mno-elrw "lrw" . CK801 (on) (off) . -mistack -mno-istack (interrupt stack) (off) . -mistack (attributes) "interrupt" "isr" . -mmp (off) . -mcp (coprocessor) (off) . -mcache (off) . -msecurity C-SKY (off) . -mtrust (trust) C-SKY (off) . -mdsp -medsp -mvdsp C-SKY DSP (Enhanced DSP) (Vector DSP) . (off) . -mdiv -mno-div . (off) . -msmart -mno-smart (Smart Mode) 0 7 . CK801 CK802 (on) . (off) . -mhigh-registers -mno-high-registers 16 31. CK801 CK802 CK803 . -manchor -mno-anchor (global anchor symbol addresses)..IP -mpushpop 4 -mno-pushpop "push" "pop". . -mmultiple-stld -mstm -mno-multiple-stld -mno-stm "stm" "ldm". CK801 . -mconstpool -mno-constpool (constant pools) . CK801 CK802 . -mstack-size -mno-stack-size ".stack_size" . . -mccrt -mno-ccrt (runtime) C-SKY libgcc. . -mbranch-cost=n (branch costs) "n" . 1 . -msched-prolog -mno-sched-prolog . C-SKY V2 ABI (backtrace) . . -msim libsemi.a . ELF . Cygwin MinGW Microsoft Windows : -mconsole (linker) PE . Cygwin MinGW . -mcrtdll=library library C RunTime DLL. "__CRTDLL__" "__MSVCRT__" "_UCRT" "__MSVCRT_VERSION__" library CRT CRT . CRT : "crtdll*" "msvcrt10*" "msvcrt20*" "msvcrt40*" "msvcr40*" "msvcrtd*" "msvcrt-os*" "msvcr70*" "msvcr71*" "msvcr80*" "msvcr90*" "msvcr100*" "msvcr110*" "msvcr120*" "ucrt*". MinGW "msvcrt" . "msvcrt" MinGW ( ) CRT MinGW MinGW . "msvcrt-os" MinGW "msvcrt.dll" MinGW . CRT DLL MinGW CRT . . MinGW . -mdll Cygwin MinGW . DLL--- --- . -mnop-fun-dllimport Cygwin MinGW . "dllimport" . -mthreads MinGW . MinGW . -municode MinGW-w64 . "UNICODE" . -mwin32 Cygwin MinGW . Microsoft Windows / . -mwindows Cygwin MinGW . (GUI) PE . -fno-set-stack-executable MinGW . . (kernel mode) Microsoft Windows User32 API . -fwritable-relocated-rdata MinGW Cygwin . ".data" . ".rdata" . -mpe-aligned-commons Cygwin MinGW . GNU PE COMMON . GCC . x86 . Darwin Darwin . FSF GCC Darwin (<>) GCC . GCC Apple Darwin -arch <> lipo . (subtype) ( ppc7400 ppc970 i686) ISA GCC -mcpu -march. -force_cpusubtype_ALL . Darwin ISA . as ppc750 . /usr/bin/libtool ( ppc970 ppc7400) . ld . -Fdir (framework) dir . -I . . Headers / PrivateHeaders .framework . .framework . Headers . (subframework) Frameworks . (include) . . . . /System/Library/Frameworks /Library/Frameworks . include "#include " Framework header.h PrivateHeaders Headers ..IP -iframeworkdir 4 -F . -iframework -F -iframework dir . C . -gused . stabs -feliminate-unused-debug-symbols . (ON) . -gfull . -fconstant-cfstrings -fconstant-cfstrings -mconstant-cfstrings . -mconstant-cfstrings NeXT ( ) -fconstant-string-class "@"..."" CoreFoundation . -mmacosx-version-min=version MacOS X version . version 12 10.12 10.5.8 . . -mkernel . -mkernel -static -fno-common -fno-use-cxa-atexit -fno-exceptions -fno-non-call-exceptions -fapple-kext -fno-weak -fno-rtti . PowerPC -mno-altivec -msoft-float -fno-builtin -mlong-branch . -mone-byte-bool "bool" "sizeof(bool)==1" . Darwin/PowerPC sizeof(bool) 4 Darwin/x86 1 x86 . : -mone-byte-bool GCC . . . -mfix-and-continue -ffix-and-continue -findirect-data GDB .o . -findirect-data -ffix-and-continue . -all_load . ld(1) . -arch_errors_fatal . -bind_at_load . -bundle Mach-o bundle . ld(1) . -bundle_loader executable (executable) . ld(1) . -dynamiclib GCC libtool Darwin . -force_cpusubtype_ALL GCC -mcpu -march ALL . -nodefaultrpaths (run paths) . macOS 10.5 -nodefaultrpaths . macOS 10.11 ( ). -allowable_client client_name -client_name -compatibility_version -current_version -dead_strip -dependency-file -dylib_file -dylinker_install_name -dynamic -exported_symbols_list -filelist -flat_namespace -force_flat_namespace -headerpad_max_install_names -image_base -init -install_name -keep_private_externs -multi_module -multiply_defined -multiply_defined_unused -noall_load -no_dead_strip_inits_and_terms -nofixprebinding -nomultidefs -noprebind -noseglinkedit -pagezero_size -prebind -prebind_all_twolevel_modules -private_bundle -read_only_relocs -sectalign -sectobjectsymbols -whyload -seg1addr -sectcreate -sectobjectsymbols -sectorder -segaddr -segs_read_only_addr -segs_read_write_addr -seg_addr_table -seg_addr_table_filename -seglinkedit -segprot -segs_read_only_addr -segs_read_write_addr -single_module -sub_library -sub_umbrella -twolevel_namespace -umbrella -undefined -unexported_symbols_list -weak_reference_mismatches -whatsloaded Darwin . Darwin . DEC Alpha -m DEC Alpha : -mno-soft-float -msoft-float ( ) . -msoft-float libgcc.a . . Alpha . Alpha . -mfp-reg -mno-fp-regs ( ). -mno-fp-regs -msoft-float . $f0 $0 . -mno-fp-regs . . -mieee Alpha . IEEE . . IEEE inexact-flag ( ). "_IEEE_FP" . (denormalized) IEEE (not-a-number) / . Alpha -ieee_with_no_inexact . -mieee-with-inexact -mieee inexact-flag IEEE . IEEE . "_IEEE_FP" "_IEEE_FP_EXACT" . Alpha . inexact-flag . Alpha -ieee_with_inexact . -mfp-trap-mode=trap-mode . Alpha -fptm trap-mode . : n () . ( ). u n (underflow) . su u ( Alpha ). sui su (inexact) . -mfp-rounding-mode=rounding-mode IEEE . Alpha -fprm rounding-mode . rounding-mode : n IEEE. . m . c (Chopped). . d . (fpcr Alpha ) . C . fpcr d . -mtrap-precision=trap-precision Alpha (imprecise) . . GCC . : p . . f . . i . . Alpha -scope_safe -resumption_safe . -mieee-conformant IEEE . -mtrap-precision=i -mfp-trap-mode=su -mfp-trap-mode=sui . .eflag 48 (prologue) . -mbuild-constants GCC . (data segment) . GCC ( ). (dynamic loader) . (relocate) . -mbwx -mno-bwx -mcix -mno-cix -mfix -mno-fix -mmax -mno-max GCC BWX CIX FIX MAX . -mcpu= GCC ..IP -msafe-bwa 4 -mno-safe-bwa BWX GCC (aligned word) (multi- thread) (async-signal) . -msafe-partial -mno-safe-partial GCC - . -mfloat-vax -mfloat-ieee IEEE VAX F G ( ). -mexplicit-relocs -mno-explicit-relocs Alpha (symbol relocations) . . GNU binutils 2.12 . GCC . -msmall-data -mlarge-data -mexplicit-relocs gp-relative . -msmall-data ( ".sdata" ".sbss") - $gp . 64KB . -mlarge-data . 2GB . 2GB heap "malloc" "mmap" . -fpic -msmall-data -fPIC -mlarge-data . -msmall-text -mlarge-text -msmall-text ( ) 4MB (branch) . -msmall-data $gp . -mlarge-text . -mcpu=cpu_type cpu_type . EV . GCC EV4 EV5 EV6 . GCC . cpu_type : ev4 ev45 21064 EV4 . ev5 21164 EV5 . ev56 21164a EV5 BWX . pca56 21164pc 21164PC EV5 BWX MAX . ev6 21264 EV6 BWX FIX MAX . ev67 21264a EV6 BWX CIX FIX MAX . (Native toolchains) native . GCC -mcpu=native . -mtune=cpu_type cpu_type . . native . GCC -mtune=native . -mmemory-latency=time (latency) . . time : number . L1 L2 L3 main <<>> EV4 EV5 ( Dcache Scache Bcache ) . L3 EV5 . eBPF -mframe-limit=bytes (hard limit) . 32767 . . -mbig-endian big-endian. -mlittle-endian little-endian. . -mjmpext -mno-jmpext . v2 ..IP -mjmp32 4 -mno-jmp32 . CPU v3 . -malu32 -mno-alu32 ALU. CPU v3 . -mv3-atomics -mno-v3-atomics CPU v3 . CPU v3 . -mbswap -mno-bswap (byte swap). CPU v4 . -msdiv -mno-sdiv . CPU v4 . -msmov -mno-smov . CPU v4 . -mcpu=version eBPF ISA . . v4 . version : v1 eBPF ISA . v2 -mjmpext. v3 v2 : -< -mjmp32> -< ALU -malu32> -< -mv3-atomics> v4 v3 : -< -mbswap> -< -msdiv> -< -msmov> -mco-re BPF Compile Once - Run Everywhere (CO-RE) . -gbtf . -mno-co-re BPF Compile Once - Run Everywhere (CO-RE) . BPF CO-RE BTF BPF . -mxbpf BPF BPF : -< callee-saved > . -masm=dialect dialect eBPF . pseudoc . dialect : normal . pseudoc (pseudo-c) . -minline-memops-threshold=bytes memmove memcpy memset . BPF (libcalls) . 1024 . FR30 FR30 . -msmall-model (small). . -mno-lsim (libsim.a) . FT32 FT32 . -msim . . / . -mlra . . -mnodiv div mod . -mft32b FT32B . -mcompress Ft32B . -mnopm . FRV -mgpr-32 . -mgpr-64 . -mfpr-32 . -mfpr-64 . -mhard-float . -msoft-float ..IP -malloc-cc 4 (condition code). -mfixed-cc "icc0" "fcc0" . -mdword ABI (double word). -mno-dword . -mdouble (double). -mno-double . -mmedia (media). -mno-media . -mmuladd /. -mno-muladd /. -mfdpic FDPIC ABI (function descriptors) . PIC/PIE -fPIE . -fpic -fpie GOT GOT -fPIC -fPIE GOT . bfin-elf -msim . -minline-plt (inlining) PLT (bind locally) . -mfdpic . ( -fPIC -fpic) -O3 . -mTLS TLS (thread-local). -mtls TLS . -mgprel-ro "GPREL" FDPIC ABI . -fpic -fpie: . -fPIC -fPIE GOT . -mno-gprel-ro . -multilib-library-pic pic ( FD). -mlibrary-pic -fPIC -fpic -mfdpic . . -mlinked-fp EABI . -mno-linked-fp . -mlong-calls . . -malign-labels NOP . VLIW . NOP . -mlibrary-pic (position-independent) EABI. -macc-4 (media accumulator). -macc-8 . -mpack VLIW. -mno-pack VLIW. -mno-eflags ABI e_flags. -mcond-move (). . -mno-cond-move . . -mscc (). . -mno-scc . . -mcond-exec (). . -mno-cond-exec . . -mvliw-branch VLIW (). . -mno-vliw-branch VLIW. . -mmulti-cond-exec "&&" "||" (). . -mno-multi-cond-exec "&&" "||" . . -mnested-cond-exec (). . -mno-nested-cond-exec . . -moptimize-membar "membar" . . -mno-optimize-membar "membar" . -mtomcat-stats gas tomcat . -mcpu=cpu . : frv fr550 tomcat fr500 fr450 fr405 fr400 fr300 simple. GNU/Linux -m GNU/Linux : -mglibc GNU C. *-*-linux-*uclibc* *-*-linux-*musl* *-*-linux-*android*..IP -muclibc 4 uClibc. *-*-linux-*uclibc* . -mmusl musl. *-*-linux-*musl* . -mbionic Bionic. *-*-linux-*android* . -mandroid Android. *-*-linux-*android* . -mbionic -fPIC -fno-exceptions -fno-rtti . GCC Android . "__ANDROID__" . -tno-android-cc -mandroid -mbionic -fPIC -fno-exceptions -fno-rtti . -tno-android-ld -mandroid . H8/300 -m H8/300 : -mrelax -relax . -mh H8/300H. -ms H8S. -mn H8S H8/300H (normal mode). -mh -ms . -ms2600 H8S/2600. -ms . -mexr (extended registers) monitor . -mexr . H8S . -mno-exr monitor . -mno-exr . H8S . -mint32 "int" . -malign-300 H8/300H H8S H8/300. H8/300H H8S long float . -malign-300 . H8/300 . HPPA -m HPPA : -march=architecture-type . architecture-type 1.0 PA 1.0 1.1 PA 1.1 2.0 PA 2.0. /usr/lib/sched.models HP-UX . . -mpa-risc-1-0 -mpa-risc-1-1 -mpa-risc-2-0 -march=1.0 -march=1.1 -march=2.0 . -matomic-libcalls libcall sync libcalls . . libcall HPPA . libcall sync libatomic . . DImode . PA-RISC "ldcw" . libcall sync . libcall sync libgcc.a libcall libatomic . "__atomic_exchange" . DImode . -mbig-switch . . -mcaller-copies (caller) . . (aggregates) OpenMP . -mcoherent-ldcw (coherent cache-control hint) ldcw/ldcd. -mdisable-fpregs . "-msoft-float". -mdisable-indexing . MIG MACH . -mfast-indirect-calls . GCC . . -mfixed-range=register-range . (register allocator) . . . . -mgas GAS . -mgnu-ld GNU ld. -shared ld . GCC GNU . ld ld . --with-ld GCC PATH . GCC which `gcc -print-prog-name=ld` . GCC HP-UX hppa*64*-*-hpux* . -mhp-ld HP ld. -b ld +Accept TypeMismatch ld . GCC HP . ld ld . --with-ld GCC PATH . GCC which `gcc -print-prog-name=ld` . GCC HP-UX hppa*64*-*-hpux* . -mlinker-opt HP-UX. (symbolic debugging) . -mlong-calls (long call sequences) . stub . ( ) . PA 2.0 PA 1.X . (sibcalls) . -ffunction-sections -mgas -mno-portable-runtime HP-UX SOM . . (partial linking) . . pic pc ( pc-relative) . ELF pic ..IP -mlong-load-store 4 - HP-UX 10 . +k HP . -mjump-in-delay . -mno-space-regs (space registers) . GCC . PA . -mordered (ordered) (barriers) . -mportable-runtime HP ELF. -mschedule=cpu-type cpu-type. cpu-type 700 7100 7100LC 7200 7300 8000. /usr/lib/sched.models HP-UX . 8000 . -msio "_SIO" IO . -mwsio . "__hp9000s700" "__hp9000s700__" "_WSIO" IO . HP-UX HI-UX . -msoft-float . : HPPA . C . . -msoft-float . libgcc.a ( GCC ) -msoft-float . -msoft-mult . "xmpyu" . -munix=unix-std startfile UNIX. unix-std 93 95 98. 93 HP-UX . 95 HP-UX 10.10 . 98 HP-UX 11.11 . 93 HP-UX 10.00 95 HP-UX 10.10 11.00 98 HP-UX 11.11 . -munix=93 GCC 3.3 3.4 . -munix=95 "XOPEN_UNIX" "_XOPEN_SOURCE_EXTENDED" startfile unix95.o . -munix=98 "_XOPEN_UNIX" "_XOPEN_SOURCE_EXTENDED" "_INCLUDE__STDC_A1_SOURCE" "_INCLUDE_XOPEN_SOURCE_500" startfile unix98.o . . C . . UNIX "__xpg4_extended_mask" . GNU . -nolibdld libdld.sl -static HP-UX 10 . -static setlocale libc HP-UX libdld.sl . libdld.sl . -static . HP-UX 10 GCC -static libdld.sl . . - . -nolibdld GCC . -threads dce thread HP-UX. . IA-64 -m Intel IA-64 . -mbig-endian big-endian (). HP-UX . -mlittle-endian little-endian (). AIX5 GNU/Linux . -mgnu-as -mno-gnu-as ( ) GNU. . -mgnu-ld -mno-gnu-ld ( ) GNU. . -mno-pic . ABI IA-64 . -mvolatile-asm-stop -mno-volatile-asm-stop ( ) (stop bit) asm (volatile). -mregister-names -mno-register-names ( ) in loc out (stacked registers). . -mno-sdata -msdata ( ) (small data section) . . -mconstant-gp . (kernel) . -mauto-pic (self-relocatable) . -mconstant-gp . (firmware) . -minline-float-divide-min-latency . -minline-float-divide-max-throughput . -mno-inline-float-divide . -minline-int-divide-min-latency . -minline-int-divide-max-throughput . -mno-inline-int-divide . -minline-sqrt-min-latency ( ) . -minline-sqrt-max-throughput ( ) . -mno-inline-sqrt "sqrt" . -mfused-madd -mno-fused-madd ( ) / / . ..IP -mno-dwarf2-asm 4 -mdwarf2-asm DWARF ( ). GNU . -mearly-stop-bits -mno-early-stop-bits (stop bits) . . -mfixed-range=register-range (fixed registers) . . . . . -mtls-size=tls-size (immediate) TLS . 14 22 64 . -mtune=cpu-type . : itanium itanium1 merced itanium2 mckinley. -milp32 -mlp64 32 64 . 32 int long 32 . 64 int 32 long 64 . HP-UX . -mno-sched-br-data-spec -msched-br-data-spec (/) reload. "ld.a" ("ld.c" / "chk.a") . . -msched-ar-data-spec -mno-sched-ar-data-spec (/) reload. "ld.a" ("ld.c" / "chk.a") . . -mno-sched-control-spec -msched-control-spec (/) . ( reload) . "ld.s" "chk.s" . . -msched-br-in-data-spec -mno-sched-br-in-data-spec (/) reload . -msched-br-data-spec . . -msched-ar-in-data-spec -mno-sched-ar-in-data-spec (/) reload . -msched-ar-data-spec . . -msched-in-control-spec -mno-sched-in-control-spec (/) . -msched-control-spec . . -mno-sched-prefer-non-data-spec-insns -msched-prefer-non-data-spec-insns . . . -mno-sched-prefer-non-control-spec-insns -msched-prefer-non-control-spec-insns . . . -mno-sched-count-spec-in-critical-path -msched-count-spec-in-critical-path . . . -msched-spec-ldc . . -msched-control-spec-ldc . . -msched-stop-bits-after-every-cycle . . -msched-fp-mem-deps-zero-cost . . -msel-sched-dont-check-control-spec . . -msched-max-memory-insns=max-insns . . 1 . -msched-max-memory-insns-hard-limit msched-max-memory-insns (hard limit) . <<>> . LM32 -m LatticeMico32 : -mbarrel-shift-enabled (barrel-shift). -mdivide-enabled . -mmultiply-enabled . -msign-extend-enabled (sign extend). -muser-enabled . LoongArch LoongArch : -march=arch-type arch-type. -march=arch-type GCC . arch-type : native ..IP loongarch64 4 LoongArch. la464 LA464 LoongArch LSX LASX. la664 LA664 LoongArch LSX LASX LoongArch v1.1. la64v1.0 . (ISA) LoongArch64. la64v1.1 . (ISA) LoongArch64. ISA LoongArch . -mtune=tune-type . tune-type : native (native). generic LoongArch. loongarch64 LoongArch. la464 LA464 LoongArch. la664 LA664 LoongArch. -mabi=base-abi-type (calling convention) . base-abi-type : lp64d / . LP64 int long int . lp64f . LP64 int long int . lp64s . LP64 int long int . -mfpu=fpu-type FPU : 64 . 32 . none 0 . -msimd=simd-type LoongArch SIMD (vectorization) (builtin functions). : lasx LoongArch Advanced SIMD Extension (LASX) LoongArch SIMD Extension (LSX). lsx LoongArch SIMD Extension (LSX). none LoongArch SIMD . -msoft-float -mfpu=none . ABI . -msingle-float -mfpu=32 . ABI . -mdouble-float -mfpu=64 / . ABI . -mlasx -mno-lasx -mlsx -mno-lsx SIMD ( none / LSX / LASX) . LASX mlasx LSX LSX mno-lsx LASX . msimd GCC / msimd . -mbranch-cost=n n . -maddr-reg-reg-cost=n ADDRESS_REG_REG n. -mcheck-zero-division -mno-check-zero-divison ( ) . -O0 -Og -mcheck-zero-division -mno-check-zero-division . -mcond-move-int -mno-cond-move-int () . -mcond-move-int . -mcond-move-float -mno-cond-move-float () . -mcond-move-float . -mmemcpy -mno-memcpy ( ) "memcpy" . -mno-memcpy GCC (inline) . -Os "memcpy" -mno-memcpy . -mstrict-align -mno-strict-align ( ) . -mno-strict-align . -G num num (small data section). 0 . -mmax-inline-memcpy-size=n ( "memcpy" ) n . n 1024 ..IP -mcmodel=code-model 4 : tiny-static ( ) tiny ( ) normal (text segment) . (data segment) . medium . large ( ) extreme . -mcmodel=extreme -fplt / -mexplicit-relocs=none . "normal" . -mexplicit-relocs=style (relocation) . (linker relaxation) . -mexplicit-relocs=none -mexplicit-relocs=always -mexplicit-relocs=auto . GCC -mrelax : -mexplicit-relocs=none -mexplicit-relocs=always -mrelax -mexplicit-relocs=auto -mrelax . -mexplicit-relocs -mexplicit-relocs=always . -mno-explicit-relocs -mexplicit-relocs=none . -mdirect-extern-access -mno-direct-extern-access GOT (external symbols). -mno-direct-extern-access : GOT (visibility) . -mdirect-extern-access GOT PC ( PC-relative) . (firmware) -static -static-pie. -mdirect-extern-access -fPIC -fpic . -mrelax -mno-relax ( ) (linker relaxations). -mpass-mrelax-to-as . GCC : -mrelax -mrelax (conditional branch relaxation) ( ".align" GCC ) -mno-relax. -mpass-mrelax-to-as -mno-pass-mrelax-to-as ( ) -mrelax -mno-relax . GCC : -mpass-mrelax-to-as -mrelax -mno-pass-mrelax-to-as. . -mrecip (reciprocal estimate) - . -funsafe-math-optimizations -ffinite-math-only -fno-trapping-math . . frecipe frsqrte . (throughput) ulp ( 1.0 0.99999994 ). -mrecip=opt . opt ! : all . default -mrecip. none -mno-recip. div (scalar). vec-div (vectorized). sqrt . vec-sqrt . rsqrt . vec-rsqrt . -mrecip=all,!sqrt . -mfrecipe -mno-frecipe ( ) "frecipe.{s/d}" "frsqrte.{s/d}". -march=la664 . -mno-frecipe . -mdiv32 -mno-div32 ( ) "div.w[u]" "mod.w[u]" (sign-extended) . -march=la664 . -mno-div32 . -mlam-bh -mno-lam-bh ( ) "am{swap/add}[_db].{b/h}". -march=la664 . -mno-lam-bh . -mlamcas -mno-lamcas ( ) "amcas[_db].{b/h/w/d}". -march=la664 . -mno-lamcas . -mld-seq-sa -mno-ld-seq-sa - ("dbar 0x700"). -march=la664 . -mno-ld-seq-sa - . -mtls-dialect=opt TLS (tls dialect) TLS (general dynamic) (local dynamic) . TLS . . desc TLS. -mannotate-tablejump -mno-annotate-tablejump ".discard.tablejump_annotate" "jirl" "switch" . objtool . -mno-annotate-tablejump . --param loongarch-vect-unroll-limit=n (vectorizer) . . . M32C -mcpu=name . name r8c R8C/Tiny m16c M16C ( 60/) m32cm M16C/80 m32c M32C/80 . -msim . / . / . -memregs=number GCC . GCC . . GCC . M32R/D -m Renesas M32R/D : -m32r2 M32R/2. -m32rx M32R/X. -m32r M32R. . -mmodel=small ( "ld24" ) "bl" . . "model" . -mmodel=medium ( "seth/add3" ) "bl" . -mmodel=large ( "seth/add3" ) "bl" ( "seth/add3/jl" ). -msdata=none . ".data" ".bss" ".rodata" ( "section" ). . ".sdata" ".sbss" . "section" . -msdata=sdata . -msdata=use . -G num num BSS BSS . num 8 . -msdata sdata use . -G num . num --- . -mdebug M32R . -malign-loops . -mno-align-loops . . -missue-rate=number number . number 1 2 . -mbranch-cost=number number 1 2 . 1 2 . -mflush-trap=number (trap) . 12 . 0 15 ( ) . -mno-flush-trap . -mflush-func=name . _flush_cache . -mno-flush-func . M680x0 -m M680x0 ColdFire . . -march=arch M680x0 ColdFire. arch M680x0 : 68000 68010 68020 68030 68040 68060 cpu32. ColdFire ISA Freescale : isaa isaaplus isab isac. GCC ColdFire "__mcfarch__" . arch -march . -march -mtune . -mcpu=cpu M680x0 ColdFire. M680x0 (cpu) : 68000 68010 68020 68030 68040 68060 68302 68332 cpu32. ColdFire : : -mcpu 51 : 51 51ac 51ag 51cn 51em 51je 51jf 51jg 51jm 51mm 51qe 51qm 5206 : 5202 5204 5206 5206e : 5206e 5208 : 5207 5208 5211a : 5210a 5211a 5213 : 5211 5212 5213 5216 : 5214 5216 5225 : 5224 5225 52259 : 52252 52254 52255 52256 52258 52259 5235 : 5232 5233 5234 5235 523x 5249 : 5249 5250 : 5250 5271 : 5270 5271 5272 : 5272 5275 : 5274 5275 5282 : 5280 5281 5282 528x 53017 : 53011 53012 53013 53014 53015 53016 53017 5307 : 5307 5329 : 5327 5328 5329 532x 5373 : 5372 5373 537x 5407 : 5407 5475 : 5470 5471 5472 5473 5474 5475 547x 5480 5481 5482 5483 5484 5485 arch cpu -mcpu=cpu -march=arch ( ). -mcpu -march . GCC "__mcf_cpu_cpu" ColdFire cpu . "__mcf_family_family" family . -mtune=tune -march -mcpu (tune) . M680x0 : 68000 68010 68020 68030 68040 68060 cpu32. ColdFire : cfv1 cfv2 cfv3 cfv4 cfv4e. -mtune=68020-40 68020 68030 68040 . -mtune=68020-60 68060 . -m68020-40 -m68020-60 . GCC "__mcarch" "__mcarch__" 680x0 arch . "mcarch" -ansi -std . GCC -mtune=68020-40 -mtune=68020-60 . GCC "__muarch__" ColdFire uarch uarch . -m68000 -mc68000 68000. 68000 . -march=68000 . 68000 EC000 68008 68302 68306 68307 68322 68328 68356. -m68010 68010. 68010 . -march=68010 . -m68020 -mc68020 68020. 68020 . -march=68020 . -m68030 68030. 68030 . -march=68030 . -m68040 68040. 68040 . -march=68040 . 68881/68882 68040 . 68040 . -m68060 68060. 68060 . -march=68060 . 68020 68881/68882 68060 . 68060 . -mcpu32 CPU32. CPU32 . -march=cpu32 . CPU32 CPU32+ 68330 68331 68332 68333 68334 68336 68340 68341 68349 68360. -m5200 ColdFire 520X. 520X . -mcpu=5206 . 5200 MCF5202 MCF5203 MCF5204 MCF5206. -m5206e ColdFire 5206e. -mcpu=5206e . -m528x ColdFire 528X. -mcpu=528x . -m5307 ColdFire 5307. -mcpu=5307 . -m5407 ColdFire 5407. -mcpu=5407 . -mcfv4e ColdFire V4e ( 547x/548x). . -mcpu=547x . -m68020-40 68040 . 68020/68881 68030 68040 . 68881 68040 . -march=68020 -mtune=68020-40 . -m68020-60 68060 . 68020/68881 68030 68040 . 68881 68060 . -march=68020 -mtune=68020-60 . -mhard-float -m68881 . 68020 ColdFire FPU . "__HAVE_68881__" M680x0 "__mcffpu__" ColdFire . -msoft-float . 68000 68010 68832 . ColdFire FPU . -mdiv -mno-div ( ) ColdFire. -march -mcpu ColdFire <> () M680x0 <> () . ( -mcpu). -mcpu=5206 <> -mcpu=5206e <> . GCC "__mcfhwdiv__" ..IP -mshort 4 "int" "short int" . API . -mno-short "int" . . -mnobitfield -mno-bitfield (bit-field) . -m68000 -mcpu32 -m5200 -mnobitfield . -mbitfield . -m68020 -mbitfield . 68020 . -mrtd "rtd" (pop ). . Unix Unix . (prototype) ( "printf") . . ( .) "rtd" 68010 68020 68030 68040 68060 CPU32 68000 5200 . -mno-rtd . -malign-int -mno-align-int GCC "int" "long" "long long" "float" "double" "long double" (-malign-int) (-mno-align-int). . : -malign-int GCC (ABI) m68k . pc 68000 . -fpic pc . -fPIC -mpcrel 68020 . -mno-strict-align -mstrict-align () . -msep-data . (execute-in-place) . -fPIC . -mno-sep-data . . -mid-shared-library . . -fPIC . -mno-id-shared-library . . -mshared-library-id=n . 0 . -mxgot -mno-xgot ColdFire GOT . . M680x0 -fPIC . GCC GOT . GOT 64k . : relocation truncated to fit: R_68K_GOT16O foobar -mxgot . GOT . -mxgot . GNU GOT GOT . -mxgot GOT . . GCC . -mlong-jump-table-offsets "switch" . . MCore -m Motorola M*Core . -mhardlit -mno-hardlit (inline) . -mdiv -mno-div . ( ). -mrelax-immediate -mno-relax-immediate (immediate) . -mwide-bitfields -mno-wide-bitfields "int" . -m4byte-functions -mno-4byte-functions . -mcallgraph-data -mno-callgraph-data (callgraph) . -mslow-bytes -mno-slow-bytes (word access) . -mlittle-endian -mbig-endian (little-endian) . -m210 210. -mno-lsim (libsim.a) . -mstack-increment=size . (segmentation fault) . 0x1000 . MicroBlaze -msoft-float (). -mhard-float . -mmemcpy "memcpy" . -mno-clearbss . -fno-zero-initialized-in-bss . -mcpu=cpu-type CPU . vX.YY.Z X YY Z . v3.00.a v4.00.b v5.00.a v5.00.b v6.00.a. -mxl-soft-mul (). -mxl-soft-div (). -mxl-barrel-shift (barrel shifter) . -mxl-pattern-compare . -msmall-divides . -mxl-stack-check . -fstack-check . -mxl-gp-opt ".sdata"/".sbss" GP. -mxl-multiply-high x. -mxl-float-convert . -mxl-float-sqrt () . -mbig-endian (big-endian). -mlittle-endian (little-endian). -mxl-reorder (swap / ). -mxl-mode-app-model app-model. : executable () crt0.o . xmdstub (XMD) xmdstub. crt1.o 0x800 . bootstrap (bootloader) . crt2.o . . novectors MicroBlaze . . crt3.o . -xl-mode-app-model -mxl-mode-app-model . -mpic-data-is-text-relative text data . PC GOT text . MIPS -EB (big-endian). -EL (little-endian). mips*el-*-* . -march=arch arch ISA MIPS . ISA : mips1 mips2 mips3 mips4 mips32 mips32r2 mips32r3 mips32r5 mips32r6 mips64 mips64r2 mips64r3 mips64r5 mips64r6. : 4kc 4km 4kp 4ksc 4kec 4kem 4kep 4ksd 5kc 5kf 20kc 24kc 24kf2_1 24kf1_1 24kec 24kef2_1 24kef1_1 34kc 34kf2_1 34kf1_1 34kn 74kc 74kf2_1 74kf1_1 74kf3_2 1004kc 1004kf2_1 1004kf1_1 i6400 i6500 interaptiv loongson2e loongson2f loongson3a gs464 gs464e gs264e m4k m14k m14kc m14ke m14kec m5100 m5101 octeon octeon+ octeon2 octeon3 orion p5600 p6600 r2000 r3000 r3900 r4000 r4400 r4600 r4650 r4700 r5900 r6000 r8000 rm7000 rm9000 r10000 r12000 r14000 r16000 sb1 sr71000 vr4100 vr4111 vr4120 vr4130 vr4300 vr5000 vr5400 vr5500 xlr xlp. from-abi ABI ( mips1 ABI mips3 ABI ). Linux/GNU native . GCC -march=native . 000 k ( -march=r2k). vr r . nf2_1 FPU nf1_1 FPU nf3_2 FPU : . nf nf2_1 nx bfx nf1_1 . GCC . "_MIPS_ARCH" . "_MIPS_ARCH_foo" foo "_MIPS_ARCH" . -march=r2000 "_MIPS_ARCH" "r2000" "_MIPS_ARCH_R2000" . "_MIPS_ARCH" . 000 k . from-abi ( "mips1" "mips3") . -march . -mtune=arch arch. . arch -march . GCC -march . -march -mtune . -mtune "_MIPS_TUNE" "_MIPS_TUNE_foo" -march ..IP -mips1 4 -march=mips1 . -mips2 -march=mips2 . -mips3 -march=mips3 . -mips4 -march=mips4 . -mips32 -march=mips32 . -mips32r3 -march=mips32r3 . -mips32r5 -march=mips32r5 . -mips32r6 -march=mips32r6 . -mips64 -march=mips64 . -mips64r2 -march=mips64r2 . -mips64r3 -march=mips64r3 . -mips64r5 -march=mips64r5 . -mips64r6 -march=mips64r6 . -mips16 -mno-mips16 ( ) MIPS16. GCC MIPS32 MIPS64 MIPS16e ASE . MIPS16 "mips16" "nomips16" . -mmips16e2 -mno-mips16e2 ( ) MIPS16e2 ASE. -mips16 MIPS16e2 ASE . -mflip-mips16 MIPS16 . (regression testing) MIPS16/-MIPS16 . -minterlink-compressed -mno-interlink-compressed ( ) MIPS ISA () MIPS16 microMIPS . ISA MIPS16 microMIPS . -minterlink-compressed GCC . -minterlink-mips16 -mno-interlink-mips16 -minterlink-compressed -mno-interlink-compressed. microMIPS ASE . -mabi=32 -mabi=o64 -mabi=n32 -mabi=64 -mabi=eabi ABI . EABI . GCC -mgp32 . O64 ABI : . GCC o32 ABI . -mabi=32 -mfp64 . ABI "mthc1" "mfhc1" MIPS32R2 MIPS32R3 MIPS32R5 . . $f0 $f0/$f1. (call-saved) . o32 ABI . FPXX (-mfpxx) FP64A (-mfp64 -mno-odd-spreg) . FPXX . FP32 FP64 . FP64A FP64 . "FRE" FPU MIPS32R5 FP32 FP64A FPU . -mabicalls -mno-abicalls ( ) SVR4 . -mabicalls SVR4 . -mshared -mno-shared ( ) (position-independent) . -mabicalls . -mabicalls -fPIC -fpic . GNU . GP . -mno-shared . -mno-shared binutils 2.16 GNU . ABI ABI (relocatable) . -mno-shared . -mshared . -mplt -mno-plt ( ) PLT (copy relocations) . -mno-shared -mabicalls . n64 ABI -msym32 . GCC --with-mips-plt -mplt . -mno-plt . -mxgot -mno-xgot () (GOT). GCC GOT . GOT 64k . : relocation truncated to fit: R_MIPS_GOT16 foobar -mxgot . GOT . GOT . -mxgot 64k GOT . GCC ..IP -mgp32 4 . -mgp64 . -mfp32 . -mfp64 . -mfpxx . -mhard-float . -msoft-float . . -mno-float -msoft-float . MIPS (bare-metal) ( "printf"). -mno-float . -msingle-float (single-precision) . -mdouble-float (double-precision) . . -modd-spreg -mno-odd-spreg o32 ABI . . o32 FPXX ABI -mno-odd-spreg . -mabs=2008 -mabs=legacy (NaN) IEEE 754 "abs.fmt" "neg.fmt" . -mabs=legacy (legacy) . NaN . -ffinite-math-only . -mabs=2008 IEEE 754-2008 . NaN . . -mnan=2008 -mnan=legacy (NaN) IEEE 754 . -mnan=legacy (legacy) . NaN (qNaNs) NaN (sNaNs) . -mnan=2008 IEEE 754-2008 . qNaN sNaN . -mnan=legacy GCC --with-nan=2008 . -mllsc -mno-llsc ( ) ll sc sync . GCC . -mllsc -mno-llsc ISA . GCC --with-llsc --without-llsc . --with-llsc . -mdsp -mno-dsp ( ) MIPS DSP ASE. "__mips_dsp" . "__mips_dsp_rev" . -mdspr2 -mno-dspr2 ( ) MIPS DSP ASE. "__mips_dsp" "__mips_dspr2" . "__mips_dsp_rev" . -msmartmips -mno-smartmips ( ) MIPS SmartMIPS ASE. -mpaired-single -mno-paired-single ( ) (paired-single). . -mdmx -mno-mdmx ( ) MIPS Digital Media Extension. . -mips3d -mno-mips3d ( ) MIPS-3D ASE. -mips3d -mpaired-single . -mmicromips -mno-micromips ( ) microMIPS. MicroMIPS "micromips" "nomicromips" . -mmt -mno-mt ( ) MT. -mmcu -mno-mcu ( ) MIPS MCU ASE. -meva -mno-eva ( ) MIPS Enhanced Virtual Addressing. -mvirt -mno-virt ( ) MIPS (VZ)..IP -mxpa 4 -mno-xpa ( ) MIPS ( XPA). -mcrc -mno-crc ( ) MIPS ( CRC). -mginv -mno-ginv ( ) MIPS ( GINV). -mloongson-mmi -mno-loongson-mmi ( ) MIPS Loongson ( MMI). -mloongson-ext -mno-loongson-ext ( ) MIPS Loongson ( EXT). -mloongson-ext2 -mno-loongson-ext2 ( ) MIPS Loongson ( EXT2). -mlong64 "long" . -mlong32 . -mlong32 "long" "int" . "int" "long" ABI . ABI "int" . ABI n64 EABI "long" "long" . "long" ( ) . -msym32 -mno-sym32 ( ) ABI . -mabi=64 -mno-abicalls GCC . -G num (small data section) num . GCC -mgpopt . -G . -mlocal-sdata -mno-local-sdata ( ) -G static C. -mlocal-sdata . -mno-local-sdata . -mno-local-sdata . -mextern-sdata -mno-extern-sdata ( ) -G . -mextern-sdata . Mod -mextern-sdata -G num -mgpopt Mod Var num Var . Var -G "section" Var's . Var (common) -G . -G . . -G -mno-extern-sdata . -mgpopt -mno-gpopt ( ) GP -G -mlocal-sdata -mextern-sdata . -mgpopt . -mno-gpopt $gp "_gp" . (boot monitor) $gp . ( -G0 .) -mno-gpopt -mno-local-sdata -mno-extern-sdata . -membedded-data -mno-embedded-data (data). RAM . -muninit-const-in-rodata -mno-uninit-const-in-rodata "const" . -membedded-data . -mcode-readable=setting GCC . : -mcode-readable=yes . . -mcode-readable=pcrel (PC-relative) MIPS16 . 4KSc 4KSd Read Inhibit TLB . / SRAM M4K PC-relative RAM . -mcode-readable=no . / SRAM ( M4K) PC-relative RAM . -msplit-addresses -mno-split-addresses () %hi() %lo(). -mexplicit-relocs . -mexplicit-relocs=none -mexplicit-relocs=base -mexplicit-relocs=pcrel -mexplicit-relocs -mno-explicit-relocs ( %gp_rel) . GAS GCC . "base" GAS . "pcrel" GAS %pcrel_hi %pcrel_lo ..IP -mcheck-zero-division 4 -mno-check-zero-division ( ) . -mcheck-zero-division . -mdivide-traps -mdivide-breaks MIPS break . MIPS II . ("SIGFPE") . -mdivide-traps -mdivide-breaks break . -mdivide-traps --with-divide=breaks . -mno-check-zero-division . -mload-store-pairs -mno-load-store-pairs () (load) (store) / (load/store bonding) . (bonding) . -mstrict-align -mno-strict-align -munaligned-access -mno-unaligned-access () (unaligned access) MIPS Release 6. MIPSr6 load/store (trap&emulate) . -mstrict-align . -munaligned-access -mno-unaligned-access . -mmemcpy -mno-memcpy ( ) "memcpy" . -mno-memcpy GCC (inline) . -mlong-calls -mno-long-calls ( ) "jal". "jal" . abicalls . -mno-long-calls . -mmad -mno-mad () "mad" "madu" "mul" (ISA) R4650 . -mimadd -mno-imadd () "madd" "msub". "madd" "msub" -mimadd 74k . -mfused-madd -mno-fused-madd () - (floating-point multiply-accumulate) . -mfused-madd . R8000 multiply-accumulate Flush to Zero FCSR . . (negate) . -nocpp MIPS ( .s) . -mfix-24k -mno-fix-24k 24K E48 ( /refill). GCC . -mfix-r4000 -mno-fix-r4000 R4000: - () . - . - (delay slot) . -mfix-r4400 -mno-fix-r4400 R4400: - . -mfix-r10000 -mno-fix-r10000 R10000: - "ll"/"sc" 3.0 . 2.6 (deadlock) . branch-likely . -march=r10000 -mfix-r10000 -mno-fix-r10000 . -mfix-r5900 -mno-fix-r5900 "nop" . R5900 . GCC . -mfix-rm7000 -mno-fix-rm7000 "dmult"/"dmultu" RM7000. GCC . -mfix-vr4120 -mno-fix-vr4120 VR4120: "dmultu" . - "div" "ddiv" . libgcc.a . "mips64vr*-elf" . VR4120 NOP . GCC. -mfix-vr4130 "mflo"/"mfhi" VR4130 . GCC "macc" "macchi" "dmacc" "dmacchi" VR4130 GCC "mflo" "mfhi" . -mfix-sb1 -mno-fix-sb1 SB-1 . ( <> <> SB-1 .) -mr10k-cache-barrier=setting GCC (cache barriers) (speculation) R10K . R10K . . R10K . . (dirty) . <> DMA DMA . R10K . . -mr10k-cache-barrier=setting GCC . : 1. 2. 3. . . : void foo (void); "foo" "j foo" "jal foo" . GCC GCC ( ) . : -mr10k-cache-barrier=load-store . -mr10k-cache-barrier=store . -mr10k-cache-barrier=none . . -mflush-func=func -mno-flush-func I D . "_flush_func" ( ). GCC "_flush_func" "__cpu_flush" . -mbranch-cost=num num <<>> . . -mtune . -mbranch-likely -mno-branch-likely Branch Likely . Branch Likely . MIPS32 MIPS64 Branch Likely MIPS32 MIPS64 . -mcompact-branches=never -mcompact-branches=optimal -mcompact-branches=always . -mcompact-branches=optimal . -mcompact-branches=never . -mcompact-branches=always MIPS . ( R6) (delay slot) . MIPS16/microMIPS . MIPS16/microMIPS . -mcompact-branches=optimal ISA . . -mfp-exceptions -mno-fp-exceptions (FP exceptions) . FP . FP . SB-1 FP FP . FP . -mvr4130-align -mno-vr4130-align VR4130 . GCC . VR4130 . . -O3 . -msynci -mno-synci "synci" ( ) . "synci" ( ) "__builtin___clear_cache" . -mno-synci GCC --with-synci . "synci" . (SMP) ..IP -mrelax-pic-calls 4 -mno-relax-pic-calls PIC $25 . (linker) . GCC ".reloc" -mexplicit-relocs -mrelax-pic-calls . -mno-explicit-relocs . -mmcount-ra-address -mno-mcount-ra-address ( ) "_mcount" . "_mcount" ra-address "intptr_t *" $12 . "_mcount" : * $31. * "*ra-address" ra-address (nonnull) . -mno-mcount-ra-address . -mframe-header-opt -mno-frame-header-opt () (frame header) o32 ABI. o32 ABI . . . -mlxc1-sxc1 -mno-lxc1-sxc1 "lwxc1" "swxc1" "ldxc1" "sdxc1" () . . -mmadd4 -mno-madd4 "madd.s" "madd.d" () . . MMIX MMIX : -mlibfuncs -mno-libfuncs (intrinsic) . -mepsilon -mno-epsilon "rE" . -mabi=mmixware -mabi=gnu ( ) $0 GNU ABI $231 . -mzero-extend -mno-zero-extend (zero-extending) (sign-extending) ( ). -mknuthdiv -mno-knuthdiv . -mno-knuthdiv . . -mtoplevel-symbols -mno-toplevel-symbols : ( ) "PREFIX" . -melf ELF mmo mmix . -mbranch-predict -mno-branch-predict (static branch prediction) (probable-branch) ( ). -mbase-addresses -mno-base-addresses ( ) (base addresses) . ( ) . . . -mno-base-addresses . -msingle-exit -mno-single-exit ( ) . MN10300 -m Matsushita MN10300 : -mmult-bug MN10300 . . -mno-mult-bug MN10300 . -mam33 AM33 . -mno-am33 AM33 . . -mam33-2 AM33/2.0 . -mam34 AM34 . -mtune=cpu-type CPU . . CPU mn10300 am33 am33-2 am34 . -mreturn-pointer-on-d0 "a0" "d0" . "a0" (prototype) . -mno-return-pointer-on-d0 . -mno-crt0 C ..IP -mrelax 4 (relaxation) . . . -mliw AM33 Long Instruction Word . . "__LIW__" . -mno-liw Long Instruction Word . "__NO_LIW__" . -msetlb AM33 SETLB Lcc . . "__SETLB__" . -mno-setlb SETLB Lcc . "__NO_SETLB__" . Moxie -meb (big-endian). moxie-*-* . -mel (little-endian). -mmul.x mul.x umul.x. moxiebox-*-* . -mno-crt0 C . MSP430 MSP430 : -masm-hex . (testsuite) / . -mmcu= MCU . C MCU __ . msp430.h MCU . (ISA) . MCU ISA 430 ISA 430X . MCU msp430 ISA 430 . MCU msp430x ISA 430X . MCU . MCU .ld . -mmcu=xxx gcc C "__XXX__" xxx.ld . ISA MCU (hard-coded) GCC . devices.csv . GCC devices.csv . include "-I" "-L" devices.csv include . MSP430_GCC_INCLUDE_DIR MSP430_GCC_INCLUDE_DIR devices.csv GCC devices.csv . devices.csv include . "-I" "-L" . msp430-elf{,bare}/include/devices GCC msp430-elf{,bare}/include/devices . devices.csv MCU . include . devices.csv MCU . -mwarn-mcu -mno-warn-mcu MCU -mmcu ISA -mcpu / -mhwmult . MCU . . -mcpu= (ISA) . msp430 msp430x msp430xv2. . ISA -mmcu= . -msim . -mmcu= . -mlarge ( "size_t" ). -msmall ( "size_t" ). -mrelax . mhwmult= . : none 16bit MCU 32bit / MCU f5series / MCU F5. auto . GCC MCU -mmcu . -mmcu MCU . "auto" . . . -O3 (inline) . . . . -minrt - (constructors) . . . -mtiny-printf "printf" "puts" . tiny (reentrant) . (streams) "write" stdout . write . Newlib Nano IO GCC --enable-newlib-nano-formatted-io . -mmax-inline-shift= ( ) . mspabi . . ( ISA 430). . -mcode-region= -mdata-region= "lower" "upper" "either" "section" . "lower" "upper" "either" "any". . - "any" - . (".text" ".data" ) ..IP -msilicon-errata= 4 (silicon errata) . -msilicon-errata-warn= (silicon errata) . -mwarn-devices-csv -mno-warn-devices-csv devices.csv (: ). NDS32 NDS32 : -mbig-endian big-endian. -mlittle-endian little-endian. -mreduced-regs . -mfull-regs . -mcmov (conditional move). -mno-cmov . -mext-perf (performance extension). -mno-ext-perf . -mext-perf2 (performance extension 2). -mno-ext-perf2 . -mext-string (string extension). -mno-ext-string . -mv3push push25/pop25 v3. -mno-v3push push25/pop25 v3. -m16-bit . -mno-16-bit . -misr-vector-size=num (interrupt vector) . -mcache-block-size=num (cache block) . -march=arch . -mcmodel=code-model : small (data) (read-only data) 512KB . (text) 16MB . medium 512KB 4GB . 16MB . large 4GB . -mctor-dtor / (constructor/destructor). -mrelax (linker) (relax instructions). Nvidia PTX Nvidia PTX : -m64 . ABI (64-bit) . -march=architecture-string PTX ISA. : sm_30 sm_35 sm_37 sm_52 sm_53 sm_61 sm_70 sm_75 sm_80 sm_89. --with-arch . "__PTX_SM__" sm_35 350 . -misa=architecture-string -march=. -march-map=architecture-string -march= . -march-map=sm_50 -march=sm_37 -march-map=sm_53 -march=sm_53 . -mptx=version-string PTX ISA. : 3.1 4.1 4.2 5.0 6.0 6.3 7.0 7.3 7.8. PTX ISA PTX ISA ( -march= ) 6.3 -march=sm_52 7.3 . "__PTX_ISA_VERSION_MAJOR__" "__PTX_ISA_VERSION_MINOR__" 3.1 3 1 . -mmainkernel (kernel) __main . (stand-alone) (offloading) . -moptimize (partitioned execution). . -msoft-stack -mno-soft-stack -mno-soft-stack ( -mgomp ) <<>> (native) PTX ".local" "alloca" PTX . -mptx=7.3 -march=sm_52 (variable-length arrays) "alloca" . -msoft-stack ( -mgomp ) ".local" "alloca" PTX . warp . ( "alloca") (global memory) (automatic variables) . OpenMP OpenMP -mgomp . -muniform-simt warp warp OpenMP SIMD . (malloc free vprintf) ( lane lane ) shuffle lane . SIMD lane 0 . "int __nvptx_uni[]" warp ( SIMD). "tid.y" lane AND lane . -mgomp OpenMP: -msoft-stack -muniform-simt multilib ..PP OpenRISC OpenRISC : -mboard=name (runtime) . newlib . "or1ksim" . -mnewlib . newlib . -msoft-div -mhard-div ("l.div" "l.divu"). . -msoft-mul -mhard-mul ("l.mul" "l.muli"). . -msoft-float -mhard-float . . -mdouble-float -mhard-float (double- precision) . libgcc . -munordered-float -mhard-float ("lf.sfun*") . libgcc . -mcmov ("l.cmov"). (set and branch) . -mror ("l.ror"). libgcc . -mrori ("l.rori"). libgcc . -msext ("l.ext*"). . -msfimm ("l.sf*i"). . -mshftimm ("l.srai" "l.srli" "l.slli"). . -mcmodel=small OpenRISC (small): GOT 64k . . -mcmodel=large OpenRISC (large): GOT 4G . PDP-11 PDP-11 : -mfpu FPP. . ( FIS PDP-11/40 .) -m45 . -msoft-float . -mac0 ac0 ( fr0 Unix). -mno-ac0 . . -m40 PDP-11/40. -msoft-float -mno-split . -m45 PDP-11/45. . -m10 PDP-11/10. -msoft-float -mno-split . -mint16 -mno-int32 "int" . . -mint32 -mno-int16 "int" . -msplit (split) . -m45 . -munix-asm Unix. -mdec-asm DEC. -mgnu-asm GNU. . -mlra LRA. <> . PowerPC . PRU PRU : -minrt (runtime). ELF C . (constructors) . . "argc" "argv" "main" "int main (void)" . (firmware) . -mmcu=mcu PRU . spec C . Newlib "sim" . GnuPruMcu ("https://github.com/dinuxbg/gnuprumcu") . -mno-relax GCC --relax --no-relax . -mloop ( ) GCC LOOP. -mabi=variant ABI . -mabi=ti TI ABI -mabi=gnu GNU GCC . : TI ABI () GNU . . TI ABI NULL . GNU . -mabi=ti . C -mabi=ti . (Relaxation) GNU -mabi=ti . TI (relocations) QBBx GNU LDI32 . RISC-V RISC-V : -mbranch-cost=n n . -mplt -mno-plt PIC PLT . PIC . -mplt . -mabi=ABI-string . ABI-string : . -march=rv64ifd -mabi=lp64d long ( int ) F . -march=rv64ifd -mabi=lp64f F D -march=rv64ifd -mabi=lp64 . . : ilp32 ilp32f ilp32d lp64 lp64f lp64d. ISA : -march=rv32if -mabi=ilp32d ABI F F . ABI ilp32e rv32e lp64e rv64e . ABI . -mfdiv -mno-fdiv . F D . . -mfence-tso -mno-fence-tso fence.tso ( T-Head) . fence.tso fence . -mdiv -mno-div . M . . -misa-spec=ISA-spec-string ISA ( User-Level) RISC-V . ISA-spec-string : 2.2 2.2. 20190608 20190608. 20191213 20191213. -misa-spec=20191213 GCC --with-isa-spec= . -march=ISA-string ISA RISC-V ( rv64im). ISA . rv64i rv32g rv32e rv32imaf . help (-march=help) . ISA : " rv32 rv64 " i e g ISA . " . " ( zba) ( v) . (underscore) . " ISA . " . " " p ( m2p1 m2). : : : i @tab 2.0, 2.1 @tab . e @tab 2.0 @tab . g @tab - @tab g i m a f d zicsr zifencei . m @tab 2.0 @tab . a @tab 2.0, 2.1 @tab (Atomic). f @tab 2.0, 2.2 @tab . d @tab 2.0, 2.2 @tab . c @tab 2.0 @tab (Compressed). h @tab 1.0 @tab (Hypervisor). v @tab 1.0 @tab (Vector). zicsr @tab 2.0 @tab (CSR). zifencei @tab 2.0 @tab (Instruction-fetch fence). zicond @tab 1.0 @tab . za64rs @tab 1.0 @tab . za128rs @tab 1.0 @tab . zawrs @tab 1.0 @tab (Wait-on-reservation-set). zba @tab 1.0 @tab . zbb @tab 1.0 @tab ..IP zbc 4 @tab 1.0 @tab . zbs @tab 1.0 @tab . zfinx @tab 1.0 @tab . zdinx @tab 1.0 @tab . zhinx @tab 1.0 @tab . zhinxmin @tab 1.0 @tab . zbkb @tab 1.0 @tab . zbkc @tab 1.0 @tab . zbkx @tab 1.0 @tab crossbar . zkne @tab 1.0 @tab AES. zknd @tab 1.0 @tab AES. zknh @tab 1.0 @tab . zkr @tab 1.0 @tab . zksed @tab 1.0 @tab SM4. zksh @tab 1.0 @tab SM3. zkt @tab 1.0 @tab . zk @tab 1.0 @tab . zkn @tab 1.0 @tab NIST. zks @tab 1.0 @tab ShangMi. zihintntl @tab 1.0 @tab . zihintpause @tab 1.0 @tab (Pause). zicboz @tab 1.0 @tab . zicbom @tab 1.0 @tab . zicbop @tab 1.0 @tab . zic64b @tab 1.0 @tab . ziccamoa @tab 1.0 @tab A . ziccif @tab 1.0 @tab . zicclsm @tab 1.0 @tab / . ziccrse @tab 1.0 @tab LR/SC . zicntr @tab 2.0 @tab . zihpm @tab 2.0 @tab . ztso @tab 1.0 @tab (TSO). zve32x @tab 1.0 @tab . zve32f @tab 1.0 @tab . zve64x @tab 1.0 @tab . zve64f @tab 1.0 @tab . zve64d @tab 1.0 @tab . zvl32b @tab 1.0 @tab . zvl64b @tab 1.0 @tab . zvl128b @tab 1.0 @tab . zvl256b @tab 1.0 @tab . zvl512b @tab 1.0 @tab . zvl1024b @tab 1.0 @tab . zvl2048b @tab 1.0 @tab . zvl4096b @tab 1.0 @tab . zvbb @tab 1.0 @tab . zvbc @tab 1.0 @tab . zvkb @tab 1.0 @tab . zvkg @tab 1.0 @tab GCM/GMAC. zvkned @tab 1.0 @tab AES..IP zvknha 4 @tab 1.0 @tab SHA-2. zvknhb @tab 1.0 @tab SHA-2. zvksed @tab 1.0 @tab SM4. zvksh @tab 1.0 @tab SM3. zvkn @tab 1.0 @tab NIST zvkn zvkned zvknhb zvkb zvkt . zvknc @tab 1.0 @tab NIST zvknc zvkn zvbc . zvkng @tab 1.0 @tab NIST GCM zvkng zvkn zvkg . zvks @tab 1.0 @tab ShangMi zvks zvksed zvksh zvkb zvkt . zvksc @tab 1.0 @tab ShangMi zvksc zvks zvbc . zvksg @tab 1.0 @tab ShangMi GCM zvksg zvks zvkg . zvkt @tab 1.0 @tab . zfh @tab 1.0 @tab . zfhmin @tab 1.0 @tab . zvfh @tab 1.0 @tab . zvfhmin @tab 1.0 @tab . zvfbfmin @tab 1.0 @tab BF16. zfa @tab 1.0 @tab . zmmul @tab 1.0 @tab . zca @tab 1.0 @tab . zcf @tab 1.0 @tab . zcd @tab 1.0 @tab . zcb @tab 1.0 @tab . zce @tab 1.0 @tab . zcmp @tab 1.0 @tab push pop. zcmt @tab 1.0 @tab . smaia @tab 1.0 @tab . smepmp @tab 1.0 @tab PMP Machine mode. smstateen @tab 1.0 @tab . ssaia @tab 1.0 @tab supervisor-mode. sscofpmf @tab 1.0 @tab . ssstateen @tab 1.0 @tab supervisor-mode. sstc @tab 1.0 @tab supervisor-mode. svinval @tab 1.0 @tab . svnapot @tab 1.0 @tab NAPOT. svpbmt @tab 1.0 @tab . xcvmac @tab 1.0 @tab - Core-V. xcvalu @tab 1.0 @tab ALU Core-V. xcvelw @tab 1.0 @tab Core-V. xtheadba @tab 1.0 @tab T-head. xtheadbb @tab 1.0 @tab T-head. xtheadbs @tab 1.0 @tab T-head. xtheadcmo @tab 1.0 @tab T-head. xtheadcondmov @tab 1.0 @tab T-head. xtheadfmemidx @tab 1.0 @tab T-head. xtheadfmv @tab 1.0 @tab T-head. xtheadint @tab 1.0 @tab T-head. xtheadmac @tab 1.0 @tab - T-head. xtheadmemidx @tab 1.0 @tab T-head. xtheadmempair @tab 1.0 @tab -GPR T-head..IP xtheadsync 4 @tab 1.0 @tab T-head. xventanacondops @tab 1.0 @tab Ventana. -march= -mcpu . -march -mcpu= . RISC-V GCC . -mcpu=processor-string (CPU) . : sifive-e20 sifive-e21 sifive-e24 sifive-e31 sifive-e34 sifive-e76 sifive-s21 sifive-s51 sifive-s54 sifive-s76 sifive-u54 sifive-u74 sifive-x280 sifive-xp450 sifive-x670 thead-c906 tt-ascalon-d8 xiangshan-nanhu. -mcpu -march -mtune (override) . -mtune=processor-string CPU. : generic-ooo rocket sifive-3-series sifive-5-series sifive-7-series size sifive-p400-series sifive-p600-series -mcpu=. -mtune= -mcpu rocket . size . -Os . -mtune= (pipeline) . . -mpreferred-stack-boundary=num num . -mpreferred-stack-boundary ( ). : . (startup) . -msmall-data-limit=n n ( ). -msave-restore -mno-save-restore (prologue) (epilogue) . (inline) . -mmovcc -mno-movcc (branchless conditional-move) . ALU (ISA) . -minline-atomics -mno-inline-atomics (subword atomic) libatomic . libatomic . -minline-strlen -mno-inline-strlen (inlining) strlen . . strlen . -minline-strcmp -mno-inline-strcmp strcmp . . strcmp . --param riscv-strcmp-inline-limit=n . . -minline-strncmp -mno-inline-strncmp strncmp . . strncmp . --param riscv-strcmp-inline-limit=n . . -mshorten-memrefs -mno-shorten-memrefs / (load/store) / << + >> / << + >>. / . / . -mstrict-align -mno-strict-align . . -mscalar-strict-align -mno-scalar-strict-align . . -mstrict-align . -mvector-strict-align -mno-vector-strict-align . (off) (element-misaligned) . -mcmodel=medlow medium-low. (2 GiB) -2 GiB +2 GiB . . GCC --with-cmodel= . -mcmodel=medany medium-any. (2 GiB) . . medium-any (position-independent) . -mcmodel=large large . -mexplicit-relocs -mno-exlicit-relocs (relocation) . . -mrelax -mno-relax (linker relaxations) . ..IP -mriscv-attribute 4 -mno-riscv-attribute ( ) RISC-V ELF. binutils 2.32 . -mcsr-check -mno-csr-check CSR . -malign-data=type GCC . type xlen x natural . xlen . -mbig-endian (big-endian). GCC riscv64be-*-* riscv32be-*-* . -mlittle-endian (little-endian). GCC riscv64-*-* riscv32-*-* riscv64be-*-* riscv32be-*-* . -mstack-protector-guard=guard -mstack-protector-guard-reg=reg -mstack-protector-guard-offset=offset (canary) guard. global tls TLS. -mstack-protector-guard-reg=reg -mstack-protector-guard-offset=offset . Linux . -mtls-dialect=desc TLS (thread-local storage) TLS. -mtls-dialect=trad TLS TLS. . RL78 -msim (link) . -mmul=none -mmul=g10 -mmul=g13 -mmul=g14 -mmul=rl78 . "none" . . "g13" / RL78/G13 ( S2) . "g14" RL78/G14 ( S3) . "rl78" "g14" "mg10" "none" . C . : "__RL78_MUL_NONE__" "__RL78_MUL_G13__" "__RL78_MUL_G14__". -mcpu=g10 -mcpu=g13 -mcpu=g14 -mcpu=rl78 RL78 . G14 S3 RL78 . G13 S2 . G10 S1 (calling convention) . -mmul=none . -mcpu=g13 G13 -mcpu=g10 . RL78/G14 -mcpu=g14 -mcpu=rl78 (toolchain) G14 . RL78 . . C . : "__RL78_G10__" "__RL78_G13__" "__RL78_G14__". -mg10 -mg13 -mg14 -mrl78 -mcpu= . . -mallregs . "r24..r31" (interrupt handlers) . . -m64bit-doubles -m32bit-doubles "double" (-m64bit-doubles) (-m32bit-doubles) . -m32bit-doubles . -msave-mduc-in-interrupts -mno-save-mduc-in-interrupts MDUC . MDUC . MDUC . -mg13 G13 ( S2) . MDUC . IBM RS/6000 PowerPC -m IBM RS/6000 PowerPC : -mpowerpc-gpopt -mno-powerpc-gpopt -mpowerpc-gfxopt -mno-powerpc-gfxopt -mpowerpc64 -mno-powerpc64 -mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mpopcntd -mno-popcntd -mfprnd -mno-fprnd -mcmpb -mhard-dfp -mno-hard-dfp . GCC . -mcpu=cpu_type (override) . -mcpu=cpu_type . -mpowerpc-gpopt GCC PowerPC (General Purpose) (floating-point square root) . -mpowerpc-gfxopt GCC PowerPC (floating-point select) . -mmfcrf GCC (move from condition register field) POWER4 PowerPC V2.01 . -mpopcntb GCC popcount (double-precision FP reciprocal estimate) POWER5 PowerPC V2.02 . -mpopcntd GCC popcount POWER7 PowerPC V2.06 . -mfprnd GCC (FP round to integer) +POWER5 PowerPC V2.03 . -mcmpb GCC (compare bytes) POWER6 PowerPC V2.05 . -mhard-dfp GCC (decimal floating-point) POWER . -mpowerpc64 GCC PowerPC64 GPR (doubleword) . GCC -mno-powerpc64 . -mcpu=cpu_type (register usage) cpu_type . cpu_type 401 403 405 405fp 440 440fp 464 464fp 476 476fp 505 601 602 603 603e 604 604e 620 630 740 7400 7450 750 801 821 823 860 970 8540 a2 e300c2 e300c3 e500mc e500mc64 e5500 e6500 ec603e G3 G4 G5 titan power3 power4 power5 power5+ power6 power6x power7 power8 power9 power10 power11 powerpc powerpc64 powerpc64le rs64 native. -mcpu=powerpc -mcpu=powerpc64 -mcpu=powerpc64le PowerPC ( ) PowerPC (big endian) PowerPC (little endian) . native CPU . GCC -mcpu=native . . . -mcpu : -maltivec -mfprnd -mhard-float -mmfcrf -mmultiple -mpopcntb -mpopcntd -mpowerpc64 -mpowerpc-gpopt -mpowerpc-gfxopt -mmulhw -mdlmzb -mmfpgpr -mvsx -mcrypto -mhtm -mpower8-fusion -mquad-memory -mquad-memory-atomic -mfloat128 -mfloat128-hardware -mprefixed -mpcrel -mmma -mrop-protect . -mcpu -mcpu=970 -mno-altivec. AIX -maltivec -mpowerpc64 -mcpu AIX . . -mtune=cpu_type cpu_type -mcpu=cpu_type . cpu_type -mcpu -mtune . -mcpu -mtune . -mcmodel=small PowerPC64 (small model) : TOC 64k . -mcmodel=medium PowerPC64 (medium model) : TOC (static) 4G . . -mcmodel=large PowerPC64 (large model) : TOC 4G . . -maltivec -mno-altivec AltiVec ( ) (built-in) AltiVec . -mabi=altivec ABI ABI AltiVec . -maltivec (intrinsics) AltiVec "vec_splat" "vec_extract" "vec_insert" (endianness) . (big-endian) (little-endian) . -mvrsave -mno-vrsave AltiVec VRSAVE . -msecure-plt ld ld.so ".plt" ".got" . PowerPC 32-bit SYSV ABI . -mbss-plt BSS ".plt" ld.so ".plt" ".got" . PowerPC 32-bit SYSV ABI . -msplit-patch-nops NOP (patchable) -fpatchable-function-entry NOP <<>> (global entry point) NOP <<>> (local entry point) . NOP . NOP . . -misel -mno-isel ISEL . -mvsx -mno-vsx / (VSX) ( ) VSX . -mcrypto -mno-crypto 2.07 PowerPC ISA ( ) ..IP -mhtm 4 -mno-htm () (HTM) 2.07 PowerPC ISA . -mpower8-fusion -mno-power8-fusion ( ) power8 . -mquad-memory -mno-quad-memory ( ). -mquad-memory - . -mquad-memory-atomic -mno-quad-memory-atomic ( ). -mquad-memory-atomic - . -mfloat128 -mno-float128 / __float128 - IEEE - IEEE. - IEEE VSX (-mvsx) . - IEEE Linux . -mfloat128 PowerPC Linux VSX . ISA 3.0 (-mcpu=power9) - - IEEE - IEEE ISA 3.0 . ISA 3.0 - big endian - IEEE . -mfloat128-hardware -mno-float128-hardware / ISA 3.0 __float128. -mfloat128-hardware PowerPC Linux ISA 3.0 . -m32 -m64 - - Darwin SVR4 ( GNU/Linux). - int long PowerPC . - int long -mpowerpc64 PowerPC64 . -mfull-toc -mno-fp-in-toc -mno-sum-in-toc -mminimal-toc TOC ( ) . -mfull-toc . GCC TOC . GCC TOC . TOC . TOC -mno-fp-in-toc -mno-sum-in-toc TOC . -mno-fp-in-toc TOC GCC -mno-sum-in-toc GCC TOC . . GCC TOC . TOC -mminimal-toc . GCC TOC . GCC TOC . . -maix64 -maix32 ABI - AIX: - "long" - . -maix64 -mpowerpc64 -maix32 ABI - -mno-powerpc64 . GCC -maix32 . -mxl-compat -mno-xl-compat ABI AIX IBM XL . (RSA) FPR . double double long double - . XL long double. AIX K&R C ( ) . IBM XL RSA . IBM XL . -mpe IBM RS/6000 SP Parallel Environment (PE). . PE (/usr/lpp/ppe.poe/) specs -specs= . Parallel Environment -mpe -pthread . -malign-natural -malign-power AIX - Darwin - PowerPC GNU/Linux -malign-natural ABI double . -malign-power GCC ABI . GCC ABI . Darwin - -malign-power . -msoft-float -mhard-float ( ). -msoft-float GCC . -mmultiple -mno-multiple ( ). POWER PowerPC . -mmultiple PowerPC little-endian little-endian . PPC740 PPC750 little-endian . -mupdate -mno-update ( ) . . -mno-update ..IP -mavoid-indexed-addresses 4 -mno-avoid-indexed-addresses (indexed) ( ). Power6 16M . Power6 . -mfused-madd -mno-fused-madd (multiply and accumulate) ( ). . -mfused-madd -ffp-contract=fast -mno-fused-madd -ffp-contract=off . -mmulhw -mno-mulhw - (half-word) IBM 405 440 464 476 ( ). . -mdlmzb -mno-dlmzb dlmzb IBM 405 440 464 476 ( ). . -mno-bit-align -mbit-align System V.4 PowerPC (bit-fields) (). "unsigned" . -mno-bit-align . -mno-strict-align -mstrict-align System V.4 PowerPC ( ) . -mrelocatable -mno-relocatable ( ) . PowerPC ".got2" ".fixup" ( ) . -mrelocatable -mrelocatable-lib . -mrelocatable . -mrelocatable-lib -mno-relocatable-lib -mrelocatable -mrelocatable-lib ".fixup" -mrelocatable-lib -mrelocatable . -mrelocatable-lib -mrelocatable . -mno-toc -mtoc System V.4 PowerPC ( ) . -mlittle -mlittle-endian System V.4 PowerPC little-endian . -mlittle-endian -mlittle . -mbig -mbig-endian System V.4 PowerPC big-endian . -mbig-endian -mbig . -mdynamic-no-pic Darwin / macOS . . -msingle-pic-base PIC (prologue) . . -mprioritize-restricted-insns=priority . priority 0 1 2 . -msched-costly-dep=dependence_type . dependence_type : no . all . true_store_to_load (store to load) . store_to_load . number number . -minsert-sched-nops=scheme NOP . scheme : no NOP . pad NOP. regroup_exact NOP . NOP . number NOP . number NOP . -mcall-sysv System V.4 PowerPC PowerPC System V Application Binary Interface . GCC powerpc-*-eabiaix . -mcall-sysv-eabi -mcall-eabi -mcall-sysv -meabi..IP -mcall-sysv-noeabi 4 -mcall-sysv -mno-eabi . -mcall-aixdesc System V.4 PowerPC AIX . -mcall-linux System V.4 PowerPC (Linux-based GNU) . -mcall-freebsd System V.4 PowerPC FreeBSD . -mcall-netbsd System V.4 PowerPC NetBSD . -mcall-openbsd System V.4 PowerPC OpenBSD . -mtraceback=traceback_type traceback . traceback_type full part no. -maix-struct-return (structures) ( ABI AIX ). -msvr4-struct-return ( ABI SVR4 ). -mabi=abi-type ABI . : altivec no-altivec ibmlongdouble ieeelongdouble elfv1 elfv2 AIX : vec-extabi vec-default. -mabi=ibmlongdouble ABI long double IBM . long double IEEE . long double IEEE -Wno-psabi . -mlong-double-128 . -mabi=ieeelongdouble ABI long double IEEE . long double IBM . long double IBM -Wno-psabi . -mlong-double-128 . -mabi=elfv1 ABI ELFv1 ABI . ABI PowerPC (big-endian) . ABI . -mabi=elfv2 ABI ELFv2 ABI . ABI PowerPC (little-endian) . ABI . -mgnu-attribute -mno-gnu-attribute .gnu_attribute / .gnu.attributes ABI . -mprototype -mno-prototype System V.4 PowerPC (prototyped) . ("CR") (set) (clear) . -mprototype . -msim PowerPC (startup module) sim-crt0.o C libsim.a libc.a . powerpc-*-eabisim . -mmvme PowerPC crt0.o C libmvme.a libc.a . -mads PowerPC crt0.o C libads.a libc.a . -myellowknife PowerPC crt0.o C libyk.a libc.a . -mvxworks System V.4 PowerPC VxWorks . -memb PowerPC "PPC_EMB" ELF (extended relocations) eabi . -meabi -mno-eabi System V.4 PowerPC (EABI) System V.4 ( ). -meabi (aligned) "__eabi" "main" EABI -msdata "r2" "r13" . -mno-eabi EABI "main" -msdata "r13" . GCC powerpc*-*-eabi* -meabi . -msdata=eabi System V.4 PowerPC "const" ".sdata2" "r2" . -"const" ".sdata" "r13" . ".sbss" ".sdata" . -msdata=eabi -mrelocatable . -msdata=eabi -memb . -msdata=sysv System V.4 PowerPC ".sdata" "r13" . ".sbss" ".sdata" . -msdata=sysv -mrelocatable . -msdata=default -msdata System V.4 PowerPC -meabi -msdata=eabi -msdata=sysv . -msdata=data System V.4 PowerPC ".sdata" . ".sbss" . "r13" . -msdata . -msdata=none -mno-sdata PowerPC ".data" ".bss" . -mreadonly-in-sdata ".sdata" . . -mblock-move-inline-limit=num ( "memcpy" ) num (inline) . num . (target-specific). -mblock-compare-inline-limit=num ( "memcmp" ) num . num 0 ( ) . (target-specific). -mblock-compare-inline-loop-limit=num num . num "memcmp" . (target-specific)..IP -mstring-compare-inline-limit=num 4 num (inline) . "strcmp" "strncmp" . . -G num PowerPC (global and static) num data BSS BSS . num 8 . -G num . -G num . -mregnames -mno-regnames System V.4 PowerPC ( ). -mlongcall -mno-longcall . ( ) . . "shortcall" #pragma longcall(0) . (glue code) . . AIX GNU PowerPC/64 . GNU PowerPC . PowerPC64 ELFv2 PowerPC GNU GCC PLT ( -mpltseq). PowerPC -mbss-plt PowerPC64 ELFv1 ( big-endian) PLT . Darwin/PPC "#pragma longcall" "jbsr callee, L42" ( ) . . Darwin/PPC PPC "bl" "bl callee" "bl L42" . . Mach-O (Darwin) Darwin . GCC longcall . -mpltseq -mno-pltseq -fno-plt PLT ( ) (lazy linking) dlopen . PLT PowerPC64 ELFv2 PowerPC GNU GCC PowerPC GCC --enable-secureplt . -mpltseq (relocatable objects) PowerPC -mbss-plt . -mtls-markers -mno-tls-markers "__tls_get_addr" (relocation) ( ). TLS GCC . -mrecip -mno-recip - (Newton-Raphson) . -mrecip -ffast-math ( -funsafe-math-optimizations -ffinite-math-only -freciprocal-math -fno-trapping-math) . (throughput) ulp ( 1.0 0.99999994 ) . -mrecip=opt . opt "!" : all . default -mrecip . none -mno-recip . div . divf . divd . rsqrt . rsqrtf . rsqrtd . -mrecip=all,!rsqrtd "FRSQRTE" "XSRSQRTEDP" "XVRSQRTEDP" . -mrecip-precision -mno-recip-precision ( ) ABI PowerPC . -mcpu=power6 -mcpu=power7 -mcpu=power8 -mrecip-precision . . -mveclibabi=type ABI (intrinsics) . mass Mathematical Acceleration Subsystem (MASS) IBM . GCC power7 "acosd2" "acosf4" "acoshd2" "acoshf4" "asind2" "asinf4" "asinhd2" "asinhf4" "atan2d2" "atan2f4" "atand2" "atanf4" "atanhd2" "atanhf4" "cbrtd2" "cbrtf4" "cosd2" "cosf4" "coshd2" "coshf4" "erfcd2" "erfcf4" "erfd2" "erff4" "exp2d2" "exp2f4" "expd2" "expf4" "expm1d2" "expm1f4" "hypotd2" "hypotf4" "lgammad2" "lgammaf4" "log10d2" "log10f4" "log1pd2" "log1pf4" "log2d2" "log2f4" "logd2" "logf4" "powd2" "powf4" "sind2" "sinf4" "sinhd2" "sinhf4" "sqrtd2" "sqrtf4" "tand2" "tanf4" "tanhd2" "tanhf4" . -ftree-vectorize -funsafe-math-optimizations . MASS . -mfriz -mno-friz -funsafe-math-optimizations "friz" ( ). "friz" . -mpointers-to-nested-functions -mno-pointers-to-nested-functions AIX TOC "r2" (static chain) "r11" ("r11") ( ). -mpointers-to-nested-functions . -mno-pointers-to-nested-functions ..IP -msave-toc-indirect 4 -mno-save-toc-indirect ( ) TOC (prologue) AIX 64-bit Linux . TOC . -mno-save-toc-indirect . -mcompat-align-parm -mno-compat-align-parm ( ) (structure) GCC. GCC ( 4.9.0) . GCC . GCC . -mno-compat-align-parm . -mstack-protector-guard=guard -mstack-protector-guard-reg=reg -mstack-protector-guard-offset=offset canary guard. global canary tls canary TLS ( 2.4 GNU libc). -mstack-protector-guard-reg=reg -mstack-protector-guard-offset=offset canary . ABI . -mpcrel -mno-pcrel ( ) (pc-relative). -mpcrel (-mcmodel=medium) (-mprefixed) . -mprefixed -mno-prefixed ( ) (load) (store). -mprefixed -mcpu=power10 ( ) . -mmma -mno-mma ( ) MMA. -mma -mcpu=power10 ( ) . -mrop-protect -mno-rop-protect ( ) ROP . shrink-wrap (-fshrink-wrap) . -mprivileged -mno-privileged ( ) (privileged state) . -mblock-ops-unaligned-vsx -mno-block-ops-unaligned-vsx ( ) vsx (inline expansion) "memcpy" "memmove". --param rs6000-vect-unroll-limit= (vectorizer) (unroll) . . . RX (RX Options) RX : -m64bit-doubles -m32bit-doubles "double" (-m64bit-doubles) (-m32bit-doubles) . -m32bit-doubles . : RX -m32bit-doubles . -fpu -nofpu RX (-fpu) (-nofpu) . RX600 RX200 . -m64bit-doubles FPU double . : -fpu -funsafe-math-optimizations . FPU RX . -mcpu=name RX . : RX600 RX200 RX610. RX600 . RX600 RX610 RX610 "MVTIPL" . RX200 -nofpu . -mbig-endian-data -mlittle-endian-data ( ) big-endian . -mlittle-endian-data little-endian. -msmall-data-limit=N (global) (static) (small data area) . . RX ( "r13") . / . (common variables) . . (-O2 ) . . -mpid . -msim -mno-sim (simulator runtime). libgloss . -mas100-syntax -mno-as100-syntax AS100 Renesas . GAS . -mmax-constant-size=N RX . RX . . (constant pool) . N 0 4 . 0 () 4 ..IP -mrelax 4 (linker relaxation). . . -mint-register=N (fast interrupt handler) . N 0 4 . 1 "r13" . 2 "r13" "r12" . 3 "r13" "r12" "r11" 4 "r13" "r10" . 0 . -msave-acc-in-interrupts (accumulator) . . . -mpid -mno-pid (position independent data) . . (relocate) . . "r13" . / . -msmall-data-limit / -mint-register . "r13" -mint-register -mpid -msmall-data-limit . -mint-register=4 -mpid "r8" . . -mno-pid . -mno-warn-multiple-fast-interrupts -mwarn-multiple-fast-interrupts GCC . RX . -mallow-string-insns -mno-allow-string-insns "SMOVF" "SCMPU" "SMOVB" "SMOVU" "SUNTIL" "SWHILE" "RMPA" . (prefetch) I/O . ( 12.2.7 RX62N Group User's Manual ). GCC I/O . I/O -mno-allow-string-insns . GCC C "__RX_ALLOW_STRING_INSNS__" "__RX_DISALLOW_STRING_INSNS__" . -mjsr -mno-jsr ( ) "JSR" . "BSR" . -mno-jsr "JSR" (branch) . : GCC -ffixed-reg "interrupt" RX . . GCC "r10" "r11" "r12" / "r13" -ffixed-reg -mint-register . S/390 zSeries -m S/390 zSeries . -mhard-float -msoft-float ( ) . -msoft-float libgcc.a . -mhard-float IEEE . . -mhard-dfp -mno-hard-dfp ( ) . -mno-hard-dfp libgcc.a . -mhard-dfp . -march=z9-ec . -mlong-double-64 -mlong-double-128 "long double" . "long double" "double" . . -mbackchain -mno-backchain ( ) backchain . backchain DWARF . -mno-packed-stack backchain -mpacked-stack backchain (word) / . -mbackchain -mno-backchain (call-compatible) backchain -mbackchain . -mbackchain -mpacked-stack -mhard-float . -msoft-float . backchain . -mpacked-stack -mno-packed-stack ( ) (packed stack layout). -mno-packed-stack / . -mpacked-stack . -mbackchain (word) backchain backchain . backchain -mpacked-stack -mno-packed-stack . FSF GCC 2.95 S/390 zSeries backchain . -mpacked-stack . -mbackchain -mpacked-stack -mhard-float . -msoft-float . . -msmall-exec -mno-small-exec ( ) "bras" . 64k . "basr" ..IP -m64 4 -m31 -m31 ABI GNU/Linux for S/390 . -m64 ABI GNU/Linux for zSeries . GCC - . s390 -m31 s390x -m64 . -mzarch -mesa -mzarch z/Architecture . -mesa ESA/390 . -mesa -m64 . ABI GNU/Linux for S/390 -mesa . ABI GNU/Linux for zSeries -mzarch . -mhtm -mno-htm -mhtm (builtins) (transactional execution facility) IBM zEnterprise EC12 S/390 System z Built-in Functions. -mhtm -march=zEC12 . -mvx -mno-vx -mvx (vector extension facility) IBM z13 . ABI (alignment) (calling conventions) . ABI GAS .gnu_attribute ABI . -mvx -march=z13 . -mzvector -mno-zvector -mzvector IBM z13 . vector . vector GNU -std=c99 . GCC -mzvector AltiVec Power Cell . vecintrin.h (include) . -mzvector . -mmvcle -mno-mvcle ( ) "mvcle" (block moves). -mno-mvcle "mvc" . . -mdebug -mno-debug ( ) . . -march=cpu-type cpu-type . cpu-type z900/arch5 z990/arch6 z9-109 z9-ec/arch7 z10/arch8 z196/arch9 zEC12 z13/arch11 z14/arch12 z15/arch13 z16/arch14 z17/arch15 native. -march=z900 . native . GCC -march=native . -mtune=cpu-type (Tune) cpu-type ABI . cpu-type -march . -march . -mtpf-trace -mno-tpf-trace TPF OS (trace routines) ( ). TPF OS. -mtpf-trace-skip -mno-tpf-trace-skip -mtpf-trace ( ) TPF OS . TPF OS -mtpf-trace. -mfused-madd -mno-fused-madd (floating-point multiply and accumulate) ( ). . -mwarn-framesize=framesize framesize . . (stack overflow) . -mwarn-dynamicstack "alloca" . . -mstack-guard=stack-guard -mstack-size=stack-size (back end) S/390 (function prologue) stack-guard stack-size (trap) ( S/390 ). stack-guard . . (production) . stack-size 64k stack-guard . stack-size . stack-guard stack-size . -mhotpatch=pre-halfwords,post-halfwords hotpatch (hot-patching) . NOP (pre-halfwords ) . * post-halfwords NOP ( ). hotpatching . "hotpatch" (override) . SH (SH Options) -m SH : -m1 SH1. -m2 SH2. -m2e SH2e. -m2a-nofpu SH2a FPU SH2a-FPU (FPU) ..IP -m2a-single-only 4 SH2a-FPU (double-precision) . -m2a-single SH2a-FPU (single-precision) . -m2a SH2a-FPU . -m3 SH3. -m3e SH3e. -m4-nofpu SH4 . -m4-single-only SH4 . -m4-single SH4 . -m4 SH4. -m4-100 SH4-100. -m4-100-nofpu SH4-100 . -m4-100-single SH4-100 . -m4-100-single-only SH4-100 . -m4-200 SH4-200. -m4-200-nofpu SH4-200 . -m4-200-single SH4-200 . -m4-200-single-only SH4-200 . -m4-300 SH4-300. -m4-300-nofpu SH4-300 . -m4-300-single SH4-300 . -m4-300-single-only SH4-300 . -m4-340 SH4-340 ( MMU FPU). -m4-500 SH4-500 ( FPU). -isa=sh4-nofpu . -m4a-nofpu SH4al-dsp SH4a . -m4a-single-only SH4a . -m4a-single SH4a . -m4a SH4a. -m4al -m4a-nofpu -dsp . GCC DSP . -mb (big-endian). -ml (little-endian). -mdalign (doubles) . (calling conventions) C -mdalign . -mrelax -relax . -mbigtable "switch". . -mbitops SH2A. -mfmovd "fmovd". -mdalign . -mrenesas Renesas. -mno-renesas GCC Renesas. SH . -mnomacsave "MAC" (call-clobbered) -mrenesas . -mieee -mno-ieee IEEE (unordered) . -mieee . -ffinite-math-only -mno-ieee . -mieee -mno-ieee . -minline-ic_invalidate (instruction cache) . -musermode ( -m4) "icbi" . "icbi" -musermode (associative write) . (privileged mode) TLB . -misize . -mpadstruct . / (pad) SH ABI . -matomic-model=model . __atomic Builtins . : none . "sh*-*-linux*" . soft-gusa gUSA GNU/Linux . / SH3* SH4* . "sh*-*-linux*" SH3* SH4* . SH4A "movli.l" "movco.l" strict . soft-tcb (thread control block) . gUSA SH1* SH2* . / . gbr-offset= ..IP soft-imask 4 "SR.IMASK = 1111" . (privileged mode) . / . "sh*-*-linux*" SH1* SH2* . hard-llcs "movli.l" "movco.l" . SH4A . . SH4A / . / . gbr-offset= (thread control block) soft-tcb . . 0-1020 . strict . -mtas "tas.b" "__atomic_test_and_set" . "tas.b" . SH4A "tas.b" . -mprefergot (Procedure Linkage Table) (Global Offset Table) . -musermode -mno-usermode ( ) (privileged mode) . -musermode -mno-inline-ic_invalidate . -musermode "sh*-*-linux*" . SH1* SH2* -musermode . -multcost=number . -mdiv=strategy . strategy : call-div1 "div1" . (trap) . SH4 SH2A SHcompact . call-fp . . SHcompact FPU . FPU "call-div1" . call-table "div1" . . SH4 . "call-div1" . . SH2A "divs" "divu" . -maccumulate-outgoing-args (function prologue) . . (unwinding) . -mdivsi3_libfunc=name name . call // . -mfixed-range=register-range (fixed registers) . . . . . -mbranch-cost=num num . . . -mzdcbranch -mno-zdcbranch ( ) (zero displacement) "bt" "bf" . -mzdcbranch . SH4 SH4A . -mno-zdcbranch . -mcbranch-force-delay-slot (delay slots) "nop" . . SH7055 . -mfused-madd -mno-fused-madd ( ). . -mfused-madd -ffp-contract=fast -mno-fused-madd -ffp-contract=off . -mfsca -mno-fsca "fsca" . -mfsca -funsafe-math-optimizations . SH4A . -mno-fsca -funsafe-math-optimizations . -mfsrra -mno-fsrra "fsrra" . -mfsrra -funsafe-math-optimizations -ffinite-math-only . SH4A . -mno-fsrra -funsafe-math-optimizations -ffinite-math-only . -mpretend-cmove (conditional move) . SH4 . -mfdpic ABI FDPIC . Solaris 2 -m Solaris 2 : -mclear-hwcap -mclear-hwcap Solaris . ISA . -mimpure-text -mimpure-text -shared -z text . . -mimpure-text "relocations remain against allocatable but non-writable sections" . (copy-on-write) . -mimpure-text -fpic -fPIC ..PP Solaris 2 : -pthreads -pthread . SPARC -m SPARC : -mno-app-regs -mapp-regs -mapp-regs (global registers) SPARC SVR4 ABI . (clobbered) . . SVR4 ABI -mno-app-regs . . -mflat -mno-flat -mflat save/restore <<>> . . ( ) << >> (call-saved) . -mno-flat ( ) save/restore ( leaf functions). . -mfpu -mhard-float (floating-point). . -mno-fpu -msoft-float . : SPARC . C (cross-compilation) . . sparc-*-aout sparclite-*-* . -msoft-float (calling convention) . libgcc.a ( GCC ) -msoft-float . -mhard-quad-float quad-word ( long double). -msoft-quad-float (long double). SPARC ABI . . SPARC . (trap handler) . ABI . -msoft-quad-float . -mno-unaligned-doubles -munaligned-doubles double . . -munaligned-doubles GCC double . . . . -muser-mode -mno-user-mode (supervisor mode) . "casa" LEON3 . . -mfaster-structs -mno-faster-structs -mfaster-structs (structures) . "ldd" "std" "ld" "st" . SPARC ABI . ABI . -mstd-struct-return -mno-std-struct-return -mstd-struct-return (unions) ABI - . -mno-std-struct-return . . -mcpu=cpu_type cpu_type . cpu_type : v7, cypress, v8, supersparc, hypersparc, leon, leon3, leon3v7, leon5, sparclite, f930, f934, sparclite86x, sparclet, tsc701, v9, ultrasparc, ultrasparc3, niagara, niagara2, niagara3, niagara4, niagara7 m8. Solaris GNU/Linux native . GCC -mcpu=native . . v7 v8 sparclite sparclet v9. : v7 cypress, leon3v7 v8 supersparc, hypersparc, leon, leon3, leon5 sparclite f930, f934, sparclite86x sparclet tsc701 v9 ultrasparc, ultrasparc3, niagara, niagara2, niagara3, niagara4, niagara7, m8 ( ) GCC V7 SPARC . -mcpu=cypress Cypress CY7C602 ( SPARCStation/SPARCServer 3xx ) . SPARCStation 1 2 IPX . -mcpu=v8 GCC V8 SPARC . V7 SPARC-V8 SPARC-V7 . -mcpu=supersparc SuperSPARC SPARCStation 10 1000 2000 . -mcpu=sparclite GCC SPARClite SPARC . (integer divide step) ("ffs") SPARClite SPARC-V7 . -mcpu=f930 Fujitsu MB86930 SPARClite FPU . -mcpu=f934 Fujitsu MB86934 SPARClite FPU . -mcpu=sparclet GCC SPARClet SPARC . / (multiply/accumulate) ("ffs") SPARClet SPARC-V7 . -mcpu=tsc701 TEMIC SPARClet . -mcpu=v9 GCC V9 SPARC . (conditional move) . -mcpu=ultrasparc Sun UltraSPARC I/II/IIi . -mcpu=ultrasparc3 Sun UltraSPARC III/III+/IIIi/IIIi+/IV/IV+ . -mcpu=niagara Sun UltraSPARC T1 . -mcpu=niagara2 Sun UltraSPARC T2 . -mcpu=niagara3 Sun UltraSPARC T3 . -mcpu=niagara4 Sun UltraSPARC T4 . -mcpu=niagara7 Oracle SPARC M7 . -mcpu=m8 Oracle M8 . cpu_type -mcpu=cpu_type . -mcpu=cpu_type -mtune=cpu_type . : cypress supersparc hypersparc leon leon3 leon3v7 leon5 f930 f934 sparclite86x tsc701 ultrasparc ultrasparc3 niagara niagara2 niagara3 niagara4 niagara7 m8. Solaris GNU/Linux native . -mv8plus -mno-v8plus -mv8plus GCC SPARC-V8+ ABI . V8 ABI . Solaris SPARC-V9 . -mvis -mno-vis -mvis GCC UltraSPARC Visual Instruction Set . -mno-vis . -mvis2 -mno-vis2 -mvis2 GCC 2.0 UltraSPARC Visual Instruction Set . ( UltraSPARC-III ) -mvis2 . -mvis2 -mvis . -mvis3 -mno-vis3 -mvis3 GCC 3.0 UltraSPARC Visual Instruction Set . ( niagara-3 ) -mvis3 . -mvis3 -mvis2 -mvis . -mvis3b -mno-vis3b -mvis3b GCC 3.0 UltraSPARC Visual Instruction Set VIS Oracle SPARC Architecture 2011 . ( niagara-7 ) -mvis3b . -mvis3b -mvis3 -mvis2 -mvis . -mvis4 -mno-vis4 -mvis4 GCC 4.0 UltraSPARC Visual Instruction Set . ( niagara-7 ) -mvis4 . -mvis4 -mvis3b -mvis3 -mvis2 -mvis . -mvis4b -mno-vis4b -mvis4b GCC 4.0 UltraSPARC Visual Instruction Set VIS Oracle SPARC Architecture 2017 . ( m8 ) -mvis4b . -mvis4b -mvis4 -mvis3b -mvis3 -mvis2 -mvis . -mcbcond -mno-cbcond -mcbcond GCC Compare-and-Branch-on-Condition UltraSPARC . ( Niagara-4 ) -mcbcond . -mfmaf -mno-fmaf -mfmaf GCC Fused Multiply-Add UltraSPARC . ( Niagara-3 ) -mfmaf . -mfsmuld -mno-fsmuld -mfsmuld GCC Floating-point Multiply Single to Double (FsMULd) . V8 V9 FPU -mfsmuld -mcpu=leon. -mpopc -mno-popc -mpopc GCC (Population Count) UltraSPARC . ( Niagara-2 ) -mpopc . -msubxc -mno-subxc -msubxc GCC (Subtract-Extended-with-Carry) UltraSPARC . ( Niagara-7 ) -msubxc . -mfix-at697f (erratum) Atmel AT697F ( AT697E ) . -mfix-ut699 (data cache nullify) UT699 . -mfix-ut700 (back-to-back store) UT699E/UT700 . -mfix-gr712rc (back-to-back store) GR712RC . -m SPARC-V9 : -m32 -m64 . int long pointer . int long pointer . -mcmodel=which : medlow / (Medium/Low): (link) . . medmid / (Medium/Middle): text data 2GB data 2GB text . medany / (Medium/Anywhere): text data 2GB data 2GB text . embmedany / (embedded): text data 2GB ( ). %g4 data . PIC . : default . rmo (Relaxed Memory Order) pso (Partial Store Order) tso (Total Store Order) sc (Sequential Consistency) D SPARC-V9 "PSTATE.MM" . -mstack-bias -mno-stack-bias -mstack-bias GCC (stack pointer) (frame pointer) -2047 . 64- . . System V System V Release 4 : -G (shared object). -symbolic -shared . -Qy ".ident" . -Qn ".ident" ( ). -YP,dirs dirs -l. -Ym,dir dir M4. . V850 -m V850 : -mlong-calls -mno-long-calls ( ). . -mno-ep -mep ( ) "ep" "sld" "sst" . -mep . -mno-prolog-function -mprolog-function ( ) (prologue) (epilogue) . . -mprolog-function . -mspace . -mep -mprolog-function . -mtda=n n (tiny data area) "ep" . ( ). -msda=n n (small data area) "gp" . . -mzda=n n . -mv850 V850 . -mv850e3v5 V850E3V5 . "__v850e3v5__" . -mv850e2v4 V850E3V5 . -mv850e3v5 . -mv850e2v3 V850E2V3 . "__v850e2v3__" . -mv850e2 V850E2 . "__v850e2__" . -mv850e1 V850E1 . "__v850e1__" "__v850e__" . -mv850es V850ES . -mv850e1 . -mv850e V850E . "__v850e__" . -mv850 -mv850e -mv850e1 -mv850e2 -mv850e2v3 -mv850e3v5 __v850*__ . "__v850" "__v851__" . -mdisable-callt -mno-disable-callt "CALLT" v850e v850e1 v850e2 v850e2v3 v850e3v5 v850 . RH850 ABI ( -mrh850-abi ) GCC ABI . "CALLT" C "__V850_CALLT__" . -mrelax -mno-relax ( ) -mrelax . -mlong-jumps -mno-long-jumps ( ) (PC-relative). -msoft-float -mhard-float ( ) . V850E2V3 . C "__FPU_OK__" "__NO_FPU__" . -mloop LOOP e3v5 . e3v5 ..IP -mrh850-abi 4 -mghs RH850 V850 ABI . . ABI : * . * ( ) (by value) . * . * -m8byte-align . * -mdisable-callt . -mno-disable-callt . ABI C "__V850_RH850_ABI__" . -mgcc-abi GCC V850 ABI . ABI : * "r10" . * ( ) (by reference) . * . * -m8byte-align . * -mdisable-callt . ABI C "__V850_GCC_ABI__" . -m8byte-align -mno-8byte-align "double" "long long" . . -m8byte-align C "__V850_8BYTE_ALIGN__" . -mbig-switch (big switch tables) . switch . -mapp-regs r2 r5 . . -mno-app-regs r2 r5 . VAX -m VAX : -munix ("aobleq" ) Unix VAX . -mgnu GNU . -md -md-float D_floating G_floating. -mg -mg-float G_floating D_floating. -mlra -mno-lra (Local Register Allocation) . VAX (standard reload) . Visium -mdebug / MCM . libc.a libdebug.a . GDB . -msim / . libc.a libsim.a . -mfpu -mhard-float . . -mno-fpu -msoft-float . -msoft-float . libgcc.a GCC -msoft-float . -mcpu=cpu_type cpu_type . cpu_type mcm gr5 gr6. mcm gr5 . ( ) GCC GR5 Visium . -mcpu=gr6 GCC GR6 Visium . GR5 (block move) . -mtune=cpu_type cpu_type -mcpu=cpu_type . -msv-mode (supervisor mode) . . -muser-mode (user mode) : GR5 r24 r31 GR6 r29 r31 . VMS -m VMS : -mvms-return-codes VMS "main" . ( ) POSIX . -mdebug-main=prefix prefix . -mmalloc64 . -mpointer-size=size . size 32 short 64 long no . "pragma pointer_size" . VxWorks VxWorks . . -mrtp GCC VxWorks (RTP) . . "__RTP__" . -msmp SMP (linking) . PowerPC VxWorks VxWorks . -non-static RTP . -static -shared RTP -static . -Bstatic -Bdynamic . Diab . -Xbind-lazy (lazy binding) . -Wl,-z,now Diab . -Xbind-now . Diab . x86 -m x86 . -march=cpu-type cpu-type . -mtune=cpu-type cpu-type -march=cpu-type GCC . -march=cpu-type -mtune=cpu-type . cpu-type : native . -march=native ( ). -mtune=native . x86-64 CPU MMX SSE SSE2 FXSR. x86-64-v2 x86-64-v3 x86-64-v4 cpu-type psABI x86-64 . ABI psABI x86-64 CPU psABI x86-64 . cpu-type -mtune -march (generic) . -mtune=other-cpu-type other-cpu-type . i386 Intel i386. i486 Intel i486. ( .) i586 pentium Intel Pentium MMX. lakemont Intel Lakemont Intel Pentium. pentium-mmx Intel Pentium MMX Pentium MMX. pentiumpro Intel Pentium Pro MMX. i686 -march Pentium Pro i686 . -mtune generic . pentium2 Intel Pentium II Pentium Pro MMX FXSR. pentium3 pentium3m Intel Pentium III Pentium Pro MMX FXSR SSE. pentium-m Intel Pentium M Intel Pentium III MMX SSE SSE2 FXSR. Centrino. pentium4 pentium4m Intel Pentium 4 MMX SSE SSE2 FXSR. prescott Intel Pentium 4 MMX SSE SSE2 SSE3 FXSR. nocona Intel Pentium 4 MMX SSE SSE2 SSE3 FXSR. core2 Intel Core 2 MMX SSE SSE2 SSE3 SSSE3 CX16 SAHF FXSR. nehalem corei7 Intel Nehalem MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR. westmere Intel Westmere MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR PCLMUL. sandybridge corei7-avx Intel Sandy Bridge MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL. ivybridge core-avx-i Intel Ivy Bridge MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C. haswell core-avx2 Intel Haswell MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE. broadwell Intel Broadwell MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW. skylake Intel Skylake MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX. skylake-avx512 Intel Skylake MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX AVX512F CLWB AVX512VL AVX512BW AVX512DQ AVX512CD..IP cascadelake 4 Intel Cascade Lake 64-bit MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX AVX512F CLWB AVX512VL AVX512BW AVX512DQ AVX512CD AVX512VNNI. cannonlake Intel Cannon Lake 64-bit MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX AVX512F AVX512VL AVX512BW AVX512DQ AVX512CD PKU AVX512VBMI AVX512IFMA SHA. cooperlake Intel Cooper Lake 64-bit MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX AVX512F CLWB AVX512VL AVX512BW AVX512DQ AVX512CD AVX512VNNI AVX512BF16. icelake-client Intel Ice Lake 64-bit MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX AVX512F AVX512VL AVX512BW AVX512DQ AVX512CD PKU AVX512VBMI AVX512IFMA SHA AVX512VNNI GFNI VAES AVX512VBMI2 VPCLMULQDQ AVX512BITALG RDPID AVX512VPOPCNTDQ. icelake-server Intel Ice Lake 64-bit MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX AVX512F AVX512VL AVX512BW AVX512DQ AVX512CD PKU AVX512VBMI AVX512IFMA SHA AVX512VNNI GFNI VAES AVX512VBMI2 VPCLMULQDQ AVX512BITALG RDPID AVX512VPOPCNTDQ PCONFIG WBNOINVD CLWB. tigerlake Intel Tiger Lake 64-bit MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX AVX512F AVX512VL AVX512BW AVX512DQ AVX512CD PKU AVX512VBMI AVX512IFMA SHA AVX512VNNI GFNI VAES AVX512VBMI2 VPCLMULQDQ AVX512BITALG RDPID AVX512VPOPCNTDQ MOVDIRI MOVDIR64B CLWB AVX512VP2INTERSECT KEYLOCKER. rocketlake Intel Rocket Lake 64-bit MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES AVX512F AVX512VL AVX512BW AVX512DQ AVX512CD PKU AVX512VBMI AVX512IFMA SHA AVX512VNNI GFNI VAES AVX512VBMI2 VPCLMULQDQ AVX512BITALG RDPID AVX512VPOPCNTDQ. alderlake raptorlake meteorlake gracemont Intel Alder Lake/Raptor Lake/Meteor Lake/Gracemont 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AES PREFETCHW PCLMUL RDRND XSAVE XSAVEC XSAVES XSAVEOPT FSGSBASE PTWRITE RDPID SGX GFNI-SSE CLWB MOVDIRI MOVDIR64B WAITPKG ADCX AVX AVX2 BMI BMI2 F16C FMA LZCNT PCONFIG PKU VAES VPCLMULQDQ SERIALIZE HRESET KL WIDEKL AVX-VNNI. arrowlake Intel Arrow Lake 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AES PREFETCHW PCLMUL RDRND XSAVE XSAVEC XSAVES XSAVEOPT FSGSBASE PTWRITE RDPID SGX GFNI-SSE CLWB MOVDIRI MOVDIR64B WAITPKG ADCX AVX AVX2 BMI BMI2 F16C FMA LZCNT PCONFIG PKU VAES VPCLMULQDQ SERIALIZE HRESET KL WIDEKL AVX-VNNI UINTR AVXIFMA AVXVNNIINT8 AVXNECONVERT CMPCCXADD. arrowlake-s lunarlake Intel Arrow Lake S/Lunar Lake 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AES PREFETCHW PCLMUL RDRND XSAVE XSAVEC XSAVES XSAVEOPT FSGSBASE PTWRITE RDPID SGX GFNI-SSE CLWB MOVDIRI MOVDIR64B WAITPKG ADCX AVX AVX2 BMI BMI2 F16C FMA LZCNT PCONFIG PKU VAES VPCLMULQDQ SERIALIZE HRESET KL WIDEKL AVX-VNNI UINTR AVXIFMA AVXVNNIINT8 AVXNECONVERT CMPCCXADD AVXVNNIINT16 SHA512 SM3 SM4. pantherlake Intel Panther Lake 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AES PREFETCHW PCLMUL RDRND XSAVE XSAVEC XSAVES XSAVEOPT FSGSBASE PTWRITE RDPID SGX GFNI-SSE CLWB MOVDIRI MOVDIR64B WAITPKG ADCX AVX AVX2 BMI BMI2 F16C FMA LZCNT PCONFIG PKU VAES VPCLMULQDQ SERIALIZE HRESET AVX-VNNI UINTR AVXIFMA AVXVNNIINT8 AVXNECONVERT CMPCCXADD AVXVNNIINT16 SHA512 SM3 SM4 PREFETCHI. sapphirerapids emeraldrapids Intel Sapphire Rapids/Emerald Rapids 64-bit MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX AVX512F AVX512VL AVX512BW AVX512DQ AVX512CD PKU AVX512VBMI AVX512IFMA SHA AVX512VNNI GFNI VAES AVX512VBMI2 VPCLMULQDQ AVX512BITALG RDPID AVX512VPOPCNTDQ PCONFIG WBNOINVD CLWB MOVDIRI MOVDIR64B ENQCMD CLDEMOTE PTWRITE WAITPKG SERIALIZE TSXLDTRK UINTR AMX-BF16 AMX-TILE AMX-INT8 AVX-VNNI AVX512-FP16 AVX512BF16. graniterapids Intel Granite Rapids 64-bit MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX AVX512F AVX512VL AVX512BW AVX512DQ AVX512CD PKU AVX512VBMI AVX512IFMA SHA AVX512VNNI GFNI VAES AVX512VBMI2 VPCLMULQDQ AVX512BITALG RDPID AVX512VPOPCNTDQ PCONFIG WBNOINVD CLWB MOVDIRI MOVDIR64B ENQCMD CLDEMOTE PTWRITE WAITPKG SERIALIZE TSXLDTRK UINTR AMX-BF16 AMX-TILE AMX-INT8 AVX-VNNI AVX512-FP16 AVX512BF16 AMX-FP16 PREFETCHI. graniterapids-d Intel Granite Rapids D 64-bit MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX AVX512F AVX512VL AVX512BW AVX512DQ AVX512CD PKU AVX512VBMI AVX512IFMA SHA AVX512VNNI GFNI VAES AVX512VBMI2 VPCLMULQDQ AVX512BITALG RDPID AVX512VPOPCNTDQ PCONFIG WBNOINVD CLWB MOVDIRI MOVDIR64B ENQCMD CLDEMOTE PTWRITE WAITPKG SERIALIZE TSXLDTRK UINTR AMX-BF16 AMX-TILE AMX-INT8 AVX-VNNI AVX512FP16 AVX512BF16 AMX-FP16 PREFETCHI AMX-COMPLEX. diamondrapids Intel Diamond Rapids 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR AVX XSAVE PCLMUL FSGSBASE RDRND F16C AVX2 BMI BMI2 LZCNT FMA MOVBE HLE RDSEED ADCX PREFETCHW AES CLFLUSHOPT XSAVEC XSAVES SGX AVX512F AVX512VL AVX512BW AVX512DQ AVX512CD PKU AVX512VBMI AVX512IFMA SHA AVX512VNNI GFNI VAES AVX512VBMI2 VPCLMULQDQ AVX512BITALG RDPID AVX512VPOPCNTDQ PCONFIG WBNOINVD CLWB MOVDIRI MOVDIR64B ENQCMD CLDEMOTE PTWRITE WAITPKG SERIALIZE TSXLDTRK UINTR AMX-BF16 AMX-TILE AMX-INT8 AVX-VNNI AVX512FP16 AVX512BF16 AMX-FP16 PREFETCHI AMX-COMPLEX AVX10.1-512 AVX-IFMA AVX-NE-CONVERT AVX-VNNI-INT16 AVX-VNNI-INT8 CMPccXADD SHA512 SM3 SM4 AVX10.2-512 APX_F AMX-AVX512 AMX-FP8 AMX-TF32 AMX-TRANSPOSE MOVRS AMX-MOVRS USER_MSR. bonnell atom Intel Bonnell 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3. silvermont slm Intel Silvermont 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR PCLMUL PREFETCHW RDRND. goldmont Intel Goldmont 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR PCLMUL PREFETCHW RDRND AES SHA RDSEED XSAVE XSAVEC XSAVES XSAVEOPT CLFLUSHOPT FSGSBASE. goldmont-plus Intel Goldmont Plus 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR PCLMUL PREFETCHW RDRND AES SHA RDSEED XSAVE XSAVEC XSAVES XSAVEOPT CLFLUSHOPT FSGSBASE PTWRITE RDPID SGX. tremont Intel Tremont 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT CX16 SAHF FXSR PCLMUL PREFETCHW RDRND AES SHA RDSEED XSAVE XSAVEC XSAVES XSAVEOPT CLFLUSHOPT FSGSBASE PTWRITE RDPID SGX CLWB GFNI-SSE MOVDIRI MOVDIR64B CLDEMOTE WAITPKG. sierraforest Intel Sierra Forest 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AES PREFETCHW PCLMUL RDRND XSAVE XSAVEC XSAVES XSAVEOPT FSGSBASE PTWRITE RDPID SGX GFNI-SSE CLWB MOVDIRI MOVDIR64B CLDEMOTE WAITPKG ADCX AVX AVX2 BMI BMI2 F16C FMA LZCNT PCONFIG PKU VAES VPCLMULQDQ SERIALIZE HRESET KL WIDEKL AVX-VNNI AVXIFMA AVXVNNIINT8 AVXNECONVERT CMPCCXADD ENQCMD UINTR. grandridge Intel Grand Ridge 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AES PREFETCHW PCLMUL RDRND XSAVE XSAVEC XSAVES XSAVEOPT FSGSBASE PTWRITE RDPID SGX GFNI-SSE CLWB MOVDIRI MOVDIR64B CLDEMOTE WAITPKG ADCX AVX AVX2 BMI BMI2 F16C FMA LZCNT PCONFIG PKU VAES VPCLMULQDQ SERIALIZE HRESET KL WIDEKL AVX-VNNI AVXIFMA AVXVNNIINT8 AVXNECONVERT CMPCCXADD ENQCMD UINTR..IP clearwaterforest 4 Intel Clearwater Forest 64-bit MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AES PREFETCHW PCLMUL RDRND XSAVE XSAVEC XSAVES XSAVEOPT FSGSBASE PTWRITE RDPID SGX GFNI-SSE CLWB MOVDIRI MOVDIR64B CLDEMOTE WAITPKG ADCX AVX AVX2 BMI BMI2 F16C FMA LZCNT PCONFIG PKU VAES VPCLMULQDQ SERIALIZE HRESET AVX-VNNI ENQCMD UINTR AVXIFMA AVXVNNIINT8 AVXNECONVERT CMPCCXADD AVXVNNIINT16 SHA512 SM3 SM4 USER_MSR PREFETCHI. k6 AMD K6 MMX. k6-2 k6-3 AMD K6 MMX 3DNow!. athlon athlon-tbird AMD Athlon MMX 3dNOW! enhanced 3DNow! SSE. athlon-4 athlon-xp athlon-mp AMD Athlon MMX 3DNow! enhanced 3DNow! SSE. k8 opteron athlon64 athlon-fx AMD K8 x86-64 AMD Opteron Athlon 64 Athlon 64 FX. ( MMX SSE SSE2 3DNow! enhanced 3DNow! 64-bit .) k8-sse3 opteron-sse3 athlon64-sse3 AMD K8 SSE3. amdfam10 barcelona AMD Family 10h x86-64. ( MMX SSE SSE2 SSE3 SSE4A 3DNow! enhanced 3DNow! ABM 64-bit .) bdver1 AMD Family 15h x86-64. ( FMA4 AVX XOP LWP AES PCLMUL CX16 MMX SSE SSE2 SSE3 SSE4A SSSE3 SSE4.1 SSE4.2 ABM 64-bit .) bdver2 AMD Family 15h x86-64. ( BMI TBM F16C FMA FMA4 AVX XOP LWP AES PCLMUL CX16 MMX SSE SSE2 SSE3 SSE4A SSSE3 SSE4.1 SSE4.2 ABM 64-bit .) bdver3 AMD Family 15h x86-64. ( BMI TBM F16C FMA FMA4 FSGSBASE AVX XOP LWP AES PCLMUL CX16 MMX SSE SSE2 SSE3 SSE4A SSSE3 SSE4.1 SSE4.2 ABM 64-bit .) bdver4 AMD Family 15h x86-64. ( BMI BMI2 TBM F16C FMA FMA4 FSGSBASE AVX AVX2 XOP LWP AES PCLMUL CX16 MOVBE MMX SSE SSE2 SSE3 SSE4A SSSE3 SSE4.1 SSE4.2 ABM 64-bit .) znver1 AMD Family 17h x86-64. ( BMI BMI2 F16C FMA FSGSBASE AVX AVX2 ADCX RDSEED MWAITX SHA CLZERO AES PCLMUL CX16 MOVBE MMX SSE SSE2 SSE3 SSE4A SSSE3 SSE4.1 SSE4.2 ABM XSAVEC XSAVES CLFLUSHOPT POPCNT 64-bit .) znver2 AMD Family 17h x86-64. ( BMI BMI2 CLWB F16C FMA FSGSBASE AVX AVX2 ADCX RDSEED MWAITX SHA CLZERO AES PCLMUL CX16 MOVBE MMX SSE SSE2 SSE3 SSE4A SSSE3 SSE4.1 SSE4.2 ABM XSAVEC XSAVES CLFLUSHOPT POPCNT RDPID WBNOINVD 64-bit .) znver3 AMD Family 19h x86-64. ( BMI BMI2 CLWB F16C FMA FSGSBASE AVX AVX2 ADCX RDSEED MWAITX SHA CLZERO AES PCLMUL CX16 MOVBE MMX SSE SSE2 SSE3 SSE4A SSSE3 SSE4.1 SSE4.2 ABM XSAVEC XSAVES CLFLUSHOPT POPCNT RDPID WBNOINVD PKU VPCLMULQDQ VAES 64-bit .) znver4 AMD Family 19h x86-64. ( BMI BMI2 CLWB F16C FMA FSGSBASE AVX AVX2 ADCX RDSEED MWAITX SHA CLZERO AES PCLMUL CX16 MOVBE MMX SSE SSE2 SSE3 SSE4A SSSE3 SSE4.1 SSE4.2 ABM XSAVEC XSAVES CLFLUSHOPT POPCNT RDPID WBNOINVD PKU VPCLMULQDQ VAES AVX512F AVX512DQ AVX512IFMA AVX512CD AVX512BW AVX512VL AVX512BF16 AVX512VBMI AVX512VBMI2 AVX512VNNI AVX512BITALG AVX512VPOPCNTDQ GFNI 64-bit .) znver5 AMD Family 1ah x86-64. ( BMI BMI2 CLWB F16C FMA FSGSBASE AVX AVX2 ADCX RDSEED MWAITX SHA CLZERO AES PCLMUL CX16 MOVBE MMX SSE SSE2 SSE3 SSE4A SSSE3 SSE4.1 SSE4.2 ABM XSAVEC XSAVES CLFLUSHOPT POPCNT RDPID WBNOINVD PKU VPCLMULQDQ VAES AVX512F AVX512DQ AVX512IFMA AVX512CD AVX512BW AVX512VL AVX512BF16 AVX512VBMI AVX512VBMI2 AVX512VNNI AVX512BITALG AVX512VPOPCNTDQ GFNI AVXVNNI MOVDIRI MOVDIR64B AVX512VP2INTERSECT PREFETCHI 64-bit .) btver1 AMD Family 14h x86-64. ( MMX SSE SSE2 SSE3 SSSE3 SSE4A CX16 ABM 64-bit .) btver2 AMD Family 16h x86-64. MOVBE F16C BMI AVX PCLMUL AES SSE4.2 SSE4.1 CX16 ABM SSE4A SSSE3 SSE3 SSE2 SSE MMX 64-bit . winchip-c6 IDT WinChip C6 i486 MMX. winchip2 IDT WinChip 2 i486 MMX 3DNow!. c3 VIA C3 MMX 3DNow!. ( .) c3-2 VIA C3-2 (Nehemiah/C5XL) MMX SSE. ( .) c7 VIA C7 (Esther) MMX SSE SSE2 SSE3. ( .) samuel-2 VIA Eden Samuel 2 MMX 3DNow!. ( .) nehemiah VIA Eden Nehemiah MMX SSE. ( .) esther VIA Eden Esther MMX SSE SSE2 SSE3. ( .) eden-x2 VIA Eden X2 x86-64 MMX SSE SSE2 SSE3. ( .) eden-x4 VIA Eden X4 x86-64 MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2. ( .) nano VIA Nano x86-64 MMX SSE SSE2 SSE3 SSSE3. ( .) nano-1000 VIA Nano 1xxx x86-64 MMX SSE SSE2 SSE3 SSSE3. ( .) nano-2000 VIA Nano 2xxx x86-64 MMX SSE SSE2 SSE3 SSSE3. ( .) nano-3000 VIA Nano 3xxx x86-64 MMX SSE SSE2 SSE3 SSSE3 SSE4.1. ( .).IP nano-x2 4 VIA Nano x86-64 MMX SSE SSE2 SSE3 SSSE3 SSE4.1. ( .) nano-x4 VIA Nano x86-64 MMX SSE SSE2 SSE3 SSSE3 SSE4.1. ( .) lujiazui ZHAOXIN lujiazui x86-64 MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AES PCLMUL RDRND XSAVE XSAVEOPT FSGSBASE CX16 ABM BMI BMI2 FXSR RDSEED. AVX F16C "-march=lujiazui" . yongfeng ZHAOXIN yongfeng x86-64 MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX POPCNT AES PCLMUL RDRND XSAVE XSAVEOPT FSGSBASE CX16 ABM BMI BMI2 F16C FXSR RDSEED AVX2 FMA SHA LZCNT. shijidadao ZHAOXIN shijidadao x86-64 MOVBE MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX POPCNT AES PCLMUL RDRND XSAVE XSAVEOPT FSGSBASE CX16 ABM BMI BMI2 F16C FXSR RDSEED AVX2 FMA SHA LZCNT. geode AMD Geode MMX 3DNow!. -mtune=cpu-type ABI cpu-type . cpu-type -march=cpu-type . GCC i686-pc-linux-gnu -mtune=pentium4 Pentium 4 i686 . cpu-type -march . -mtune cpu-type : generic IA32/AMD64/EM64T . -mtune=generic -mtune -march . . . GCC GCC . -march=generic -march . -mtune ( ) . intel Intel GCC Haswell Silvermont . -mtune=intel -mtune -march . Haswell Silvermont . Intel . GCC Intel GCC . -march=intel -march . -mtune ( ) . -mcpu=cpu-type -mtune. -mfpmath=unit unit . unit : 387 387 . . . -ffloat-store . x86-32 Darwin . sse SSE. Pentium III AMD Athlon-4 Athlon XP Athlon MP . SSE 387 . Pentium 4 x86-64 AMD . x86-32 SSE -march=cpu-type -msse -msse2 . x86-64 . 387 . x86-64 x86-32 Darwin x86-32 SSE2 -ffast-math . sse,387 sse+387 both . 387 SSE . GCC . -masm=dialect (dialect) . "asm" "asm" . ( ) att intel. att . Darwin intel . -mieee-fp -mno-ieee-fp IEEE . (unordered) . -m80387 -mhard-float 80387 . -mno-80387 -msoft-float . : GCC . C (cross-compilation) . . 80387 -msoft-float (opcode) . -mno-fp-ret-in-387 FPU . "float" "double" FPU FPU FPU . -mno-fp-ret-in-387 CPU . -mno-fancy-math-387 387 "sin" "cos" "sqrt" 387 . . -march CPU FPU ( ). -funsafe-math-optimizations ..IP -malign-double 4 -mno-align-double GCC "double" "long double" "long long" . "double" Pentium . x86-64 -malign-double . : -malign-double (ABI) x86-32 . -m96bit-long-double -m128bit-long-double "long double" . x86-32 -m96bit-long-double . (Pentium ) "long double" . ABI . -m128bit-long-double "long double" . x86-64 -m128bit-long-double ABI "long double" . x87 "long double" . : ABI "long double" "long double" . . -mlong-double-64 -mlong-double-80 -mlong-double-128 "long double" . "long double" "double" . C (Bionic C library) . "long double" "__float128" . Bionic C . : ABI "long double" "long double" . . -malign-data=type GCC . type : compat GCC 4.8 abi psABI cacheline (cache line) . compat . -mlarge-data-threshold=threshold -mcmodel=medium -mcmodel=large threshold (large data sections) . 65535 . -mrtd "ret num" (pop) . . "stdcall" . "cdecl" -mrtd . : Unix Unix . (prototype) ( "printf") . . ( .) -mregparm=num . . "regparm" . : num . (startup) . -msseregparm SSE float double . "sseregparm" . : . . -mvect8-ret-in-mem MMX . VxWorks ABI Sun Studio . GCC . -mpc32 -mpc64 -mpc80 80387 . -mpc32 () ( ) -mpc64 ( ) -mpc80 ( ) . FPU . . ( ) << >> (catastrophic cancellation) . -mdaz-ftz flush-to-zero (FTZ) denormals-are-zero (DAZ) MXCSR . SSE AVX -mdaz-ftz FTZ DAZ . -mno-daz-ftz -shared FTZ/DAZ -mdaz-ftz -shared FTZ/DAZ . -mstackrealign . x86 -mstackrealign . SSE . "force_align_arg_pointer" . -mpreferred-stack-boundary=num num . -mpreferred-stack-boundary ( ). : x86-64 SSE -mpreferred-stack-boundary=3 . ABI x86-64 ABI . ( ) . SSE / (misaligned memory access traps) . ( x87 long double __int128) . -mpreferred-stack-boundary=3 . . -mincoming-stack-boundary=num num . -mincoming-stack-boundary -mpreferred-stack-boundary . Pentium Pentium Pro "double" "long double" ( -malign-double) . Pentium III Streaming SIMD Extension (SSE) "__m128" . . . . (callbacks) . . (embedded systems) -mpreferred-stack-boundary=2 ..IP -mmmx 4 -msse -msse2 -msse3 -mssse3 -msse4 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512ifma -mavx512vbmi -msha -maes -mpclmul -mclflushopt -mclwb -mfsgsbase -mptwrite -mrdrnd -mf16c -mfma -mpconfig -mwbnoinvd -mfma4 -mprfchw -mrdpid -mrdseed -msgx -mxop -mlwp -m3dnow -m3dnowa -mpopcnt -mabm -madx -mbmi -mbmi2 -mlzcnt -mfxsr -mxsave -mxsaveopt -mxsavec -mxsaves -mrtm -mhle -mtbm -mmwaitx -mclzero -mpku -mavx512vbmi2 -mavx512bf16 -mavx512fp16 -mgfni -mvaes -mwaitpkg -mvpclmulqdq -mavx512bitalg -mmovdiri -mmovdir64b -menqcmd -muintr -mtsxldtrk -mavx512vpopcntdq -mavx512vp2intersect -mavx512vnni -mavxvnni -mcldemote -mserialize -mamx-tile -mamx-int8 -mamx-bf16 -mhreset -mkl -mwidekl -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 -mprefetchi -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mapxf -musermsr -mavx10.1 -mavx10.1-256 -mavx10.1-512 -mavx10.2 -mamx-avx512 -mamx-transpose -mamx-fp8 -mmovrs -mamx-movrs MMX SSE AVX512CD AVX512VL AVX512BW AVX512DQ AVX512IFMA AVX512VBMI SHA AES PCLMUL CLFLUSHOPT CLWB FSGSBASE PTWRITE RDRND F16C FMA PCONFIG WBNOINVD FMA4 PREFETCHW RDPID RDSEED SGX XOP LWP 3DNow! 3DNow! POPCNT ABM ADX BMI BMI2 LZCNT FXSR XSAVE XSAVEOPT XSAVEC XSAVES RTM HLE TBM MWAITX CLZERO PKU AVX512VBMI2 GFNI VAES WAITPKG VPCLMULQDQ AVX512BITALG MOVDIRI MOVDIR64B AVX512BF16 ENQCMD AVX512VPOPCNTDQ AVX512VNNI SERIALIZE UINTR HRESET AMXTILE AMXINT8 AMXBF16 KL WIDEKL AVXVNNI AVX512-FP16 AVXIFMA AVXVNNIINT8 AVXNECONVERT CMPCCXADD AMX-FP16 PREFETCHI RAOINT AMX-COMPLEX AVXVNNIINT16 SM3 SHA512 SM4 APX_F USER_MSR AVX10.1 AVX10.2 AMX-AVX512 AMX-TF32 AMX-TRANSPOSE AMX-FP8 MOVRS AMX-MOVRS CLDEMOTE . -mno- . (built-in) : x86 Built-in Functions . -msse4 SSE4.1 SSE4.2 -mno-sse4 SSE4A -msse4a . SSE/SSE2 ( 387) -mfpmath=sse . -mavx GCC SSEx . AVX AVX SSEx . GCC -mfpmath=sse. . . -mdump-tune-features GCC x86 (dump) . -mtune-ctrl=feature-list . -mtune-ctrl=feature-list x86 . feature-list feature . -mdump-tune-features . feature ^ . -mtune-ctrl=feature-list GCC . (ICE) . -mno-default GCC . -mtune-ctrl=feature-list -mdump-tune-features . -mcld GCC (prologue) "cld" . DF . ABI DF DF (exception dispatchers) . DF . x86 GCC --enable-cld . "cld" -mno-cld . -mvzeroupper GCC "vzeroupper" AVX SSE (intrinsics) "zeroupper" . -mprefer-avx128 GCC (auto-vectorizer) AVX AVX . -mprefer-vector-width=opt GCC opt . -mpartial-vector-fp-math GCC (partial vectors) SSE . -fno-trapping-math . (inline assembly) NaN (denormal) -fno-trapping-math . -mdaz-ftz denormals-are-zero (DAZ) MXCSR . . -mmove-max=bits GCC bits . bits 128 256 512. -mstore-max=bits GCC bits . bits 128 256 512. none GCC . 128 . 256 . 512 . -mnoreturn-no-callee-saved-registers "noreturn" "_Noreturn" (callee-saved) ( "BP") . "noreturn" . -mcx16 GCC "CMPXCHG16B" (compare-and-exchange) . . __sync Builtins . __atomic Builtins . -msahf "SAHF" . Intel Pentium 4 Intel 64 Pentium 4 G1 "LAHF" "SAHF" AMD64 . . "SAHF" "fmod" "drem" "remainder" Other Builtins . -mmovbe "movbe" (byte swapping) . -mshstk -mshstk (shadow stack) (CET) x86 . -mcrc32 "__builtin_ia32_crc32qi" "__builtin_ia32_crc32hi" "__builtin_ia32_crc32si" "__builtin_ia32_crc32di" "crc32" . -mmwait "__builtin_ia32_monitor" "__builtin_ia32_mwait" "monitor" "mwait" . -mrecip "RCPSS" "RSQRTSS" ( "RCPPS" "RSQRTPS") - "DIVSS" "SQRTSS" ( ) . -funsafe-math-optimizations -ffinite-math-only -fno-trapping-math . (throughput) ulp ( . . ). GCC "1.0f/sqrtf(x)" "RSQRTSS" ( "RSQRTPS") -ffast-math ( ) -mrecip . GCC - sqrtf(x) -ffast-math ( ) -mrecip ..IP -mrecip=opt 4 (reciprocal estimate) . opt ! : all . default -mrecip. none -mno-recip. div . vec-div . sqrt () . vec-sqrt () . -mrecip=all,!sqrt . -mveclibabi=type ABI (intrinsics) . type svml Intel aocl (LibM) AMD Optimizing CPU Libraries (AOCL) acml AMD core math library ( AOCL-LibM ). -ftree-vectorize -funsafe-math-optimizations ABI SVML ACML . GCC "vmldExp2" "vmldLn2" "vmldLog102" "vmldPow2" "vmldTanh2" "vmldTan2" "vmldAtan2" "vmldAtanh2" "vmldCbrt2" "vmldSinh2" "vmldSin2" "vmldAsinh2" "vmldAsin2" "vmldCosh2" "vmldCos2" "vmldAcosh2" "vmldAcos2" "vmlsExp4" "vmlsLn4" "vmlsLog104" "vmlsPow4" "vmlsTanh4" "vmlsTan4" "vmlsAtan4" "vmlsAtanh4" "vmlsCbrt4" "vmlsSinh4" "vmlsSin4" "vmlsAsinh4" "vmlsAsin4" "vmlsCosh4" "vmlsCos4" "vmlsAcosh4" "vmlsAcos4" -mveclibabi=svml "amd_vrs4_acosf" "amd_vrs16_acosf" "amd_vrd8_asin" "amd_vrs4_asinf" "amd_vrs8_asinf" "amd_vrs16_asinf" "amd_vrd2_atan" "amd_vrd8_atan" "amd_vrs4_atanf" "amd_vrs8_atanf" "amd_vrs16_atanf" "amd_vrd2_cos" "amd_vrd4_cos" "amd_vrd8_cos" "amd_vrs4_cosf" "amd_vrs8_cosf" "amd_vrs16_cosf" "amd_vrs4_coshf" "amd_vrs8_coshf" "amd_vrd2_erf" "amd_vrd4_erf" "amd_vrd8_erf" "amd_vrs4_erff" "amd_vrs8_erff" "amd_vrs16_erff" "amd_vrd2_exp" "amd_vrd4_exp" "amd_vrd8_exp" "amd_vrs4_expf" "amd_vrs8_expf" "amd_vrs16_expf" "amd_vrd2_exp10" "amd_vrs4_exp10f" "amd_vrd2_exp2" "amd_vrd4_exp2" "amd_vrd8_exp2" "amd_vrs4_exp2f" "amd_vrs8_exp2f" "amd_vrs16_exp2f" "amd_vrs4_expm1f" "amd_vrd2_log" "amd_vrd4_log" "amd_vrd8_log" "amd_vrs4_logf" "amd_vrs8_logf" "amd_vrs16_logf" "amd_vrd2_log10" "amd_vrs4_log10f" "amd_vrs8_log10f" "amd_vrs16_log10f" "amd_vrd2_log1p" "amd_vrs4_log1pf" "amd_vrd2_log2" "amd_vrd4_log2" "amd_vrd8_log2" "amd_vrs4_log2f" "amd_vrs8_log2f" "amd_vrs16_log2f" "amd_vrd2_pow" "amd_vrd4_pow" "amd_vrd8_pow" "amd_vrs4_powf" "amd_vrs8_powf" "amd_vrs16_powf" "amd_vrd2_sin" "amd_vrd4_sin" "amd_vrd8_sin" "amd_vrs4_sinf" "amd_vrs8_sinf" "amd_vrs16_sinf" "amd_vrd2_tan" "amd_vrd4_tan" "amd_vrd8_tan" "amd_vrs16_tanf" "amd_vrs4_tanhf" "amd_vrs8_tanhf" "amd_vrs16_tanhf" -mveclibabi=aocl "__vrd2_sin" "__vrd2_cos" "__vrd2_exp" "__vrd2_log" "__vrd2_log2" "__vrd2_log10" "__vrs4_sinf" "__vrs4_cosf" "__vrs4_expf" "__vrs4_logf" "__vrs4_log2f" "__vrs4_log10f" "__vrs4_powf" -mveclibabi=acml . -mabi=name (calling convention) . sysv ABI GNU/Linux ms Microsoft ABI. Microsoft Windows Microsoft ABI SysV ABI . "ms_abi" "sysv_abi" . -mforce-indirect-call . Intel Processor Trace . -mmanual-endbr ENDBR "cf_check" . -fcf-protection=branch ENDBR . -mcet-switch CET switch (jump table) . (hardening) . CET . CET switch . -mcall-ms2sysv-xlogues ABI - Microsoft ABI System V ABI RSI RDI XMM6-15 (clobbered) . (inline) (prologues and epilogues) . -mcall-ms2sysv-xlogues stub libgcc . -mtls-dialect=type (thread-local storage) gnu gnu2. gnu gnu2 . -mpush-args -mno-push-args PUSH . SUB/MOV . . -maccumulate-outgoing-args . . . -mno-push-args . -mthreads (thread-safe) MinGW. thread-safe -mthreads . -mthreads -D_MT -lmingwthrd . -mms-bitfields -mno-ms-bitfields / Microsoft Windows. "packed" Microsoft ABI GCC . (packed) GCC ( ) . Microsoft Windows . . x86 Variable Attributes x86 Type Attributes . . (padding) (alignment) : . : . . . ( "aligned" "pack" ) . . : offset % alignment_requirement == 0 . . MSVC :.IP ". " 4 . : struct { unsigned long bf_1 : 12; unsigned long : 0; unsigned long bf_2 : 12; } t1; "t1" . "t1" . . "foo" "bar" "bar" . : struct { char foo : 4; short : 0; char bar; } t2; struct { char foo : 4; short : 0; double bar; } t3; "t2" "bar" . "t2" . "t3" "bar" . : . . "t2" short . . : struct { char foo : 6; long : 0; } t4; "t4" . . : struct { char foo; long : 0; char bar; } t5; "t5" . -mno-align-stringops . GCC . -minline-all-stringops GCC . "memcpy" "memset" . "strlen" . -minline-stringops-dynamically . -mstringop-strategy=alg . alg : rep_byte rep_4byte rep_8byte "rep" i386 . byte_loop loop unrolled_loop . libcall . -mmemcpy-strategy=strategy "__builtin_memcpy" . strategy alg:max_size:dest_align . alg -mstringop-strategy max_size alg . max_size -1 . max_size . alg 0 "max_size + 1" . -mmemset-strategy=strategy -mmemcpy-strategy= "__builtin_memset" . -momit-leaf-frame-pointer (frame pointer) (leaf functions) . . -fomit-leaf-frame-pointer . -mtls-direct-seg-refs -mno-tls-direct-seg-refs TLS TLS (%gs %fs ) (thread base pointer) . TLS . GNU C Library (on) . -msse2avx -mno-sse2avx SSE VEX . -mavx . -mfentry -mno-fentry (-pg) (prologue) . : x86 "ms_hook_prologue" -mfentry -pg . -mrecord-mcount -mno-record-mcount (-pg) __mcount_loc . (patching in and out) . -mnop-mcount -mno-nop-mcount (-pg) NOP . . -mrecord-mcount ..IP -minstrument-return=type 4 -pg -mfentry . ret (sibling calls) jump . none call __return__ nop5 nop . -mrecord-return -mno-record-return __return_loc . -mfentry-name=name __fentry__ -pg -mfentry . -mfentry-section=name -mrecord-mcount ( __mcount_loc). -mskip-rax-setup -mno-skip-rax-setup x86-64 SSE -mskip-rax-setup RAX . : RAX . GCC 4.4 RAX . -m8bit-idiv -mno-8bit-idiv Intel Atom / . . / . -mavx256-split-unaligned-load -mavx256-split-unaligned-store AVX . -mstack-protector-guard=guard -mstack-protector-guard-reg=reg -mstack-protector-guard-offset=offset -mstack-protector-guard-symbol=symbol (canary) guard . global tls TLS (). -fstack-protector -fstack-protector-all . -mstack-protector-guard-reg=reg -mstack-protector-guard-offset=offset (%fs %gs) . ABI . -mstack-protector-guard-symbol=symbol TLS . -mgeneral-regs-only . (bound) . -mrelax-cmpxchg-loop -- (compare-and-swap) __sync Builtins __atomic Builtins "CMPXCHG" "PAUSE" (highly contended) . -mindirect-branch=choice choice . keep . thunk (thunk) . thunk-inline . thunk-extern . "indirect_branch" . -mcmodel=large -mindirect-branch=thunk -mindirect-branch=thunk-extern . -mindirect-branch=thunk-extern -fcf-protection=branch . -mfunction-return=choice choice . keep . thunk . thunk-inline . thunk-extern . "function_return" . -mindirect-return=thunk-extern -fcf-protection=branch . -mcmodel=large -mfunction-return=thunk -mfunction-return=thunk-extern . -mindirect-branch-register . -mharden-sls=choice (straight line speculation SLS) choice . none SLS . return SLS . indirect-jmp SLS . all SLS . -mindirect-branch-cs-prefix CS call jmp r8-r15 call jmp lfence; call *%r8-r15 lfence; jmp *%r8-r15 . -mapx-inline-asm-use-gpr32 asm APX EGPR EGPR . egpr -mapx-inline-asm-use-gpr32 EGPR . -mevex512 -mno-evex512 / . AVX512F . -m x86-64 . -m32 -m64 -mx32 -m16 -miamcu . -m32 "int" "long" . -m64 "int" "long" x86-64 . Darwin -m64 -fno-pic -mdynamic-no-pic . -mx32 "int" "long" x86-64 . -m16 -m32 ".code16gcc" . -miamcu Intel MCU psABI . -m32 . -mno-red-zone << >> (red zone) x86-64 . ABI x86-64 . -mno-red-zone . -mcmodel=small (small code model) : . . . ..IP -mcmodel=kernel 4 (kernel code model). . . -mcmodel=medium : . . -mlarge-data-threshold BSS 2GB . . -mcmodel=large . . -maddress-mode=long (long address mode). - x32 . - . -maddress-mode=short (short address mode). - x32 . - x32 . -mneeded -mno-needed GNU_PROPERTY_X86_ISA_1_NEEDED ISA . -mno-direct-extern-access -fpic -fPIC GOT . -fpic -fPIC . -mdirect-extern-access . : -mno-direct-extern-access -mdirect-extern-access . -munroll-only-small-loops . O2 . -f[no-]unroll-[all-]loops . -mlam=choice LAM ( linear-address masking) . none . u48 62:48 u57 62:57 . x86 Windows Xstormy16 Xstormy16 : -msim (startup) . Xtensa Xtensa : -mconst16 -mno-const16 "CONST16" . "CONST16" Tensilica . "CONST16" "L32R" . "CONST16" "L32R" . -mfused-madd -mno-fused-madd / / (floating-point). . / / / . IEEE 754 : / IEEE . / . -mserialize-volatile -mno-serialize-volatile GCC "MEMW" "volatile" (sequential consistency) . -mserialize-volatile . -mno-serialize-volatile "MEMW" . -mforce-no-pic GNU/Linux Xtensa (PIC) PIC . -mtext-section-literals -mno-text-section-literals (literal pools) . -mno-text-section-literals . RAM/ROM . -mtext-section-literals (text section) . . . -mauto-litpools -mno-auto-litpools . -mno-auto-litpools -mtext-section-literals . -mauto-litpools . ".literal" "MOVI" "L32R" (relaxation) . -mtext-section-literals . -mtarget-align -mno-target-align GCC . (density instructions) (call) . . -mtarget-align . "LOOP" NOP . -mlongcalls -mno-longcalls GCC . . "CALL" "L32R" "CALLX" . -mno-longcalls . . GCC --- . . -mabi=name ABI . : call0 windowed. ABI Xtensa . -mabi=call0 "a2" "a7" "a12" "a15" caller-saved "a15" (frame pointer) . ABI C "__XTENSA_CALL0_ABI__" . -mabi=windowed "a10" "a15" "a2" "a7" . "a7" . . ABI C "__XTENSA_WINDOWED_ABI__" ..IP -mextra-l32r-costs=n 4 RAM/ROM "L32R" . (literal pool) "L32R" . 0 . -mstrict-align -mno-strict-align . -mno-strict-align -mstrict-align . zSeries : (ENVIRONMENT) GCC . . . -B -I -L . GCC . LANG LC_CTYPE LC_MESSAGES LC_ALL GCC GCC . GCC LC_CTYPE LC_MESSAGES . . en_GB.UTF-8 UTF-8 . LC_CTYPE . GCC . LC_MESSAGES . LC_ALL LC_CTYPE LC_MESSAGES LC_CTYPE LC_MESSAGES LANG . GCC C . TMPDIR TMPDIR . GCC : . GCC_COMPARE_DEBUG GCC_COMPARE_DEBUG -fcompare-debug . . GCC_EXEC_PREFIX GCC_EXEC_PREFIX . . GCC_EXEC_PREFIX GCC . GCC . GCC_EXEC_PREFIX prefix/lib/gcc/ prefix . prefix "prefix" configure . -B . crt0.o . . /usr/local/lib/gcc ( GCC_INCLUDE_DIR) GCC . -Bfoo/ GCC /usr/local/lib/bar foo/bar . prefix prefix GCC_EXEC_PREFIX . COMPILER_PATH COMPILER_PATH PATH. GCC GCC_EXEC_PREFIX . LIBRARY_PATH LIBRARY_PATH PATH. GCC GCC_EXEC_PREFIX . GCC -l ( -L ). LANG (locale) . C C++ . LANG : C-JIS JIS. C-SJIS SJIS. C-EUCJP EUCJP. LANG "mblen" "mbtowc" . GCC_EXTRA_DIAGNOSTIC_OUTPUT GCC_EXTRA_DIAGNOSTIC_OUTPUT (fix-it hints) (stderr) . -fdiagnostics-parseable-fixits -fno-diagnostics-parseable-fixits . fixits-v1 -fdiagnostics-parseable-fixits. . fixits-v2 "fixits-v1" -fdiagnostics-column-unit=display . . CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH OBJC_INCLUDE_PATH PATH . "PATH_SEPARATOR" GCC . Microsoft Windows (semicolon) (colon) . CPATH -I -I . . . -isystem -isystem . . . CPATH ":/special/include" -I. -I/special/include ..IP DEPENDENCIES_OUTPUT 4 Make . . DEPENDENCIES_OUTPUT Make . file target file target . -MM -MF -MT . SUNPRO_DEPENDENCIES DEPENDENCIES_OUTPUT ( ) -M -MM . . SOURCE_DATE_EPOCH UNIX "__DATE__" "__TIME__" . SOURCE_DATE_EPOCH UNIX ( ) 01 Jan 1970 00:00:00 ASCII "date +%s" GNU/Linux %s "date" . . (BUGS) : . (FOOTNOTES) 1. gcc -shared (constructors) (stub code) . (multi-libbed) gcc -shared . . . -shared -ffast-math -Ofast -funsafe-math-optimizations . (SEE ALSO) gpl(7) gfdl(7) fsf-funding(7) cpp(1) gcov(1) as(1) ld(1) gdb(1) Info gcc cpp as ld binutils gdb. (AUTHORS) GCC Info gcc . (COPYRIGHT) Copyright (c) 1988-2025 Free Software Foundation, Inc. / << >> (GNU Free Documentation License) 1.3 <> <> (a) ( ) (b) ( ). gfdl(7) . (a) FSF : A GNU Manual (b) FSF : You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. gcc-15.2.0 2025-08-08 GCC(1)