文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>GCC中文手册

GCC中文手册

时间:2007-02-05  来源:hello386

GCC

Section: GNU Tools (1)
Updated: 2003/12/05
Index Return to Main Contents  

NAME

gcc,g++-GNU工程的C和C++编译器(egcs-1.1.2)  

总览(SYNOPSIS)

gcc[option|filename ]...
g++[option|filename ]...

警告(WARNING)

本手册页内容摘自GNU C编译器的完整文档,仅限于解释选项的含义.

除非有人自愿维护,否则本手册页不再更新.如果发现手册页和软件之间有所矛盾,请查对Info文件, Info文件是权威文档.

如果我们发觉本手册页的内容由于过时而导致明显的混乱和抱怨时,我们就停止发布它.不可能有其他选择,象更新Info文件同时更新man手册,因为其他维护GNU CC的工作没有留给我们时间做这个. GNU工程认为man手册是过时产物,应该把时间用到别的地方.

如果需要完整和最新的文档,请查阅Info文件`gcc'或Using and Porting GNU CC (for version 2.0) (使用和移植GNU CC 2.0) 手册.二者均来自Texinfo原文件 gcc.texinfo.

描述(DESCRIPTION)

C和C++编译器是集成的.他们都要用四个步骤中的一个或多个处理输入文件: 预处理(preprocessing),编译(compilation),汇编(assembly)和连接(linking).源文件后缀名标识源文件的 语言,但是对编译器来说,后缀名控制着缺省设定: gcc 认为预处理后的文件(.i)是C文件,并且设定C形式的连接. g++ 认为预处理后的文件(.i)是C++文件,并且设定C++形式的连接.

源文件后缀名指出语言种类以及后期的操作:

.c C源程序;预处理,编译,汇编
.C C++源程序;预处理,编译,汇编
.cc C++源程序;预处理,编译,汇编
.cxx C++源程序;预处理,编译,汇编
.m Objective-C源程序;预处理,编译,汇编
.i 预处理后的C文件;编译,汇编
.ii 预处理后的C++文件;编译,汇编
.s 汇编语言源程序;汇编
.S 汇编语言源程序;预处理,汇编
.h 预处理器文件;通常不出现在命令行上

其他后缀名的文件被传递给连接器(linker).通常包括:
.o 目标文件(Object file)
.a
归档库文件(Archive file)

除非使用了-c, -S,或-E选项(或者编译错误阻止了完整的过程),否则连接总是 最后的步骤.在连接阶段中,所有对应于源程序的.o文件, -l库文件,无法识别的文件名(包括指定的 .o目标文件和.a库文件)按命令行中的顺序传递给连接器.

选项(OPTIONS)

选项必须分立给出: `-dr'完全不同于`-d -r '.

大多数`-f'和`-W'选项有两个相反的格式: -fname和 -fno-name (或-Wname和-Wno-name).这里 只列举不是默认选项的格式.

下面是所有选项的摘要,按类型分组,解释放在后面的章节中.

总体选项(Overall Option)
-c -S -E -o file -pipe -v -x language 语言选项(Language Option) -ansi -fall-virtual -fcond-mismatch -fdollars-in-identifiers -fenum-int-equiv -fexternal-templates -fno-asm -fno-builtin -fhosted -fno-hosted -ffreestanding -fno-freestanding -fno-strict-prototype -fsigned-bitfields -fsigned-char -fthis-is-variable -funsigned-bitfields -funsigned-char -fwritable-strings -traditional -traditional-cpp -trigraphs 警告选项(Warning Option) -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 -Wimplicit-int -Wimplicit-function-declaration -Winline -Wlong-long -Wmain -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-import -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wstrict-prototypes -Wswitch -Wtemplate-debugging -Wtraditional -Wtrigraphs -Wuninitialized -Wunused -Wwrite-strings 调试选项(Debugging Option) -a -dletters -fpretend-float -g -glevel -gcoff -gxcoff -gxcoff+ -gdwarf -gdwarf+ -gstabs -gstabs+ -ggdb -p -pg -save-temps -print-file-name=library -print-libgcc-file-name -print-prog-name=program 优化选项(Optimization Option) -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 -O3 预处理器选项(Preprocessor Option) -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 汇编器选项(Assembler Option) -Wa,option 连接器选项(Linker Option) -llibrary -nostartfiles -nostdlib -static -shared -symbolic -Xlinker option -Wl,option -u symbol 目录选项(Directory Option) -Bprefix -Idir -I- -Ldir 目标机选项(Target Option) -b machine -V version 配置相关选项(Configuration Dependent Option) M680x0 选项
-m68000 -m68020 -m68020-40 -m68030 -m68040 -m68881 -mbitfield -mc68000 -mc68020 -mfpa -mnobitfield -mrtd -mshort -msoft-float

VAX选项
-mg -mgnu -munix

SPARC选项
-mepilogue -mfpu -mhard-float -mno-fpu -mno-epilogue -msoft-float -msparclite -mv8 -msupersparc -mcypress

Convex选项
-margcount -mc1 -mc2 -mnoargcount

AMD29K选项
-m29000 -m29050 -mbw -mdw -mkernel-registers -mlarge -mnbw -mnodw -msmall -mstack-check -muser-registers

M88K选项
-m88000 -m88100 -m88110 -mbig-pic -mcheck-zero-division -mhandle-large-shift -midentify-revision -mno-check-zero-division -mno-ocs-debug-info -mno-ocs-frame-position -mno-optimize-arg-area -mno-serialize-volatile -mno-underscores -mocs-debug-info -mocs-frame-position -moptimize-arg-area -mserialize-volatile -mshort-data-num -msvr3 -msvr4 -mtrap-large-shift -muse-div-instruction -mversion-03.00 -mwarn-passed-structs

RS6000选项
-mfp-in-toc -mno-fop-in-toc

RT选项
-mcall-lib-mul -mfp-arg-in-fpregs -mfp-arg-in-gregs -mfull-fp-blocks -mhc-struct-return -min-line-mul -mminimum-fp-blocks -mnohc-struct-return

MIPS选项
-mcpu=cpu type -mips2 -mips3 -mint64 -mlong64 -mmips-as -mgas -mrnames -mno-rnames -mgpopt -mno-gpopt -mstats -mno-stats -mmemcpy -mno-memcpy -mno-mips-tfile -mmips-tfile -msoft-float -mhard-float -mabicalls -mno-abicalls -mhalf-pic -mno-half-pic -G num -nocpp

i386选项
-m486 -mno-486 -msoft-float -mno-fp-ret-in-387

HPPA选项
-mpa-risc-1-0 -mpa-risc-1-1 -mkernel -mshared-libs -mno-shared-libs -mlong-calls -mdisable-fpregs -mdisable-indexing -mtrailing-colon

i960选项
-mcpu-type -mnumerics -msoft-float -mleaf-procedures -mno-leaf-procedures -mtail-call -mno-tail-call -mcomplex-addr -mno-complex-addr -mcode-align -mno-code-align -mic-compat -mic2.0-compat -mic3.0-compat -masm-compat -mintel-asm -mstrict-align -mno-strict-align -mold-align -mno-old-align

DEC Alpha选项
-mfp-regs -mno-fp-regs -mno-soft-float -msoft-float

System V选项
-G -Qy -Qn -YP,paths -Ym,dir

代码生成选项(Code Generation Option) -fcall-saved-reg -fcall-used-reg -ffixed-reg -finhibit-size-directive -fnonnull-objects -fno-common -fno-ident -fno-gnu-linker -fpcc-struct-return -fpic -fPIC -freg-struct-return -fshared-data -fshort-enums -fshort-double -fvolatile -fvolatile-global -fverbose-asm
相关阅读 更多 +
排行榜 更多 +
摧毁大厦游戏

摧毁大厦游戏

飞行射击 下载
合并动物城手游版

合并动物城手游版

休闲益智 下载
哈士奇大冒险

哈士奇大冒险

休闲益智 下载