10.2 Cコンパイラ(gcc : GNU C compiler)

  3.gccコンパイラオプション
 コンパイラシステムへの指示を行うオプションについて、以下に示します。詳しくはgcc manual page(man gcc)を参照して下さい。

(1)全体的なオプション-c -S -E -o file -pipe -v -x language
(2)言語オプション-ansi -fall-virtual -fcond-mismatch
-fdollars-in-identifiers -fenum-int-equiv -fno-asm
-fno-builtin -fno-strict-prototype
-fsigned-bitfields -fsigned-char -fthis-is-variable
-funsigned-bitfields -funsigned-char
-fwritable-strings -traditional -traditional-cpp
-trigraphs
(3)警告オプション-fsyntax-only -pedantic -pedantic-errors -w -W
-Wall -Waggregate-return -Wcast-align -Wcast-qual
-Wchar-subscript -Wcomment -Wconversion
-Wenum-clash -Werror -Wformat -Wid-clash-len
-Wimplicit -Winline -Wmissing-prototypes
-Wnested-externs -Wno-import -Wparentheses
-Wpointer-arith -Wredundant-decls -Wreturn-type
-Wshadow -Wstrict-prototypes -Wswitch
-Wtemplate-debugging -Wtraditional -Wtrigraphs
-Wuninitialized -Wunused -Wwrite-strings
(4)デバッグオプション-a -dletters -fpretend-float -g -glevel -gcoff
-gxcoff -gxcoff+ -gdwarf -gdwarf+ -gstabs -gstabs+
-ggdb -p -pg -save-temps -print-libgcc-file-name
(5)最適化オプション-fcaller-saves -fcse-follow-jumps -fcse-skip-blocks
-fdelayed-branch -felide-constructors
-fexpensive-optimizations -ffast-math -ffloat-store
-fforce-addr -fforce-mem -finline-functions
-fkeep-inline-functions -fmemoize-lookups
-fno-default-inline -fno-defer-pop
-fno-function-cse -fno-inline -fno-peephole
-fomit-frame-pointer -frerun-cse-after-loop
-fschedule-insns -fschedule-insns2
-fstrength-reduce -fthread-jumps -funroll-all-loops
-funroll-loops -O -O2
(6)プリプロセッサオプション-Aassertion -C -dD -dM -dN -Dmacro[=defn] -E -H
-idirafter dir -include file -imacros file -iprefix
file -iwithprefix dir -M -MD -MM -MMD -nostdinc -P
-Umacro -undef
(7)アセンブラオプション-Wa,option
(8)リンカオプション-llibrary -nostartfiles -nostdlib -static -shared
-symbolic -Xlinker option -Wl,option -u symbol
(9)ディレクトリオプション-Bprefix -Idir -I- -Ldir
(10)ターゲットオプション-b machine -V version
(11)コンフィギュレーション依存オプション(省略)