Use -Q together with one of the --help= options:
optimizers
Display all of the optimization options supported by the compiler.
warnings
Display all of the options controlling warning messages produced by the compiler.
target
Display target-specific options. Unlike the --target-help option however, target-specific options of the linker and assembler are not
displayed. This is because those tools do not currently support the
extended --help= syntax.
params
Display the values recognized by the --param option.
language
Display the options supported for language, where language is the name of one of the languages supported in this version of GCC. If an
option is supported by all languages, one needs to select ‘common’
class.
common
Display the options that are common to all languages.
For instance, gcc -Q --help=optimizers shows output like:
...
-fauto-inc-dec [enabled]
-fbit-tests [enabled]
-fbranch-count-reg [disabled]
-fbranch-probabilities [disabled]
-fcaller-saves [disabled]
-fcode-hoisting [disabled]
-fcombine-stack-adjustments [disabled]
...
If you run gcc -O2 -Q --help=optimizers instead, you will see many of them change to [enabled].