diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-05-29 16:07:24 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-05-29 16:07:24 +0200 |
commit | d2013ee5952bbcf88906a832748783e372f3a939 (patch) | |
tree | 3ea461e528df72cfde0f08866275283ed3338098 /src/development | |
parent | ce8e9ba530e1c43342b21dcf300096b67ca9a8ea (diff) | |
download | notes-d2013ee5952bbcf88906a832748783e372f3a939.tar.gz notes-d2013ee5952bbcf88906a832748783e372f3a939.zip |
gcc: list warn/opt
Diffstat (limited to 'src/development')
-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)` |