diff options
-rw-r--r-- | src/development/gcc.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/development/gcc.md b/src/development/gcc.md index 39ae753..f2bd8a0 100644 --- a/src/development/gcc.md +++ b/src/development/gcc.md @@ -12,6 +12,8 @@ gcc -E [-dM] ... - `-dM` list only `#define` statements - `-###` dry-run, outputting exact compiler/linker invocations - `-print-multi-lib` print available multilib configurations +- `--help=<class>` print description of cmdline options for given class, eg + `warnings`, `optimizers`, `target`, `c`, `c++` ### Target options ```bash @@ -22,6 +24,17 @@ gcc --help=target gcc -march=native -Q --help=target ``` +### Warnings / optimizations +```bash +# List available warnings with short description. +gcc --help=warnings +# List available optimizations with short description. +gcc --help=optimizers + +# Prepend --help with `-Q` to print wheter options are enabled or disabled +# instead showing their description. +``` + ## [Builtins][builtins] ### `__builtin_expect(expr, cond)` |