-ansi | Equivalent to -std=c89 . |
-c | |
-C and -CC | instructs the preprocessor to keep comments. |
-d | |
-dM | generates a list of #define directives, including predefined macros. |
-D | defines the value of a macro. |
-dumpmachine | prints the target triplet. |
-dumpspec | |
-dumpversion | Prints the compiler's version number. |
-E | Only preprocess file. |
-f | to set many boolean like options. |
-g | Include debugging information. |
-H | Print the names of each header file that is processed. Each #include indents one level, finishing a file dedents one level. |
--help | |
-include file | Pretend the source file started with #include "file" |
-m | |
-M | show dependencies of a compilation unit (including system header files). |
-MM | show dependencies of a compilation unit (without system header files). |
-masm | Select the (dis-)assembly dialect. |
-nodefaultlibs | |
-nostartfiles | |
-nostdlib | Pass only files to the linker that are explicitly specified. |
-O | Specify optimization. |
-P | Prevent the preprocessor from including line markers in its output. |
--param name=value | |
-pedantic and -pedantic-errors | Compare with -Werror=pedantic |
-pipe | Output of one stage is passed to the next stage via pipe rather than temporary file. Can improve performance but uses more memory. |
-print-file-name | Prints the absolute path of the file that would be used for linkining. |
-print-libgcc-file-name | |
-print-prog-name | |
-print-search-dirs | reveal the directories that gcc searches for programs and libraries. |
-Q | |
-s | remove all symbol table and relocation information from the executable. |
-save-temps | Don't delete intermediate outputs (*.s , *.i , *.o ). |
-S | create assembler code (*.s ) |
-shared | Instruct the linker to create a shared object. |
-std | Choose the standard, for example -std=c99 or -std=gnu89 . |
-v | |
--version | Prints the version of the compiler |
-W | Enable warning messages |
-Wa,option-1[,option-2…] | Pass options to the assembler. |
-wrapper gdb,--args | invokes cc1 under the debugger |
-Wl,linker-option | Pass options to the linker. |
-Wp,preprocessor-option | Pass options to the preprocessor. |
-x | Specify language of input file |
@option-file | |