Professional Documents
Culture Documents
GCC
NAME
gcc,g++-GNUCC++(egcs-1.1.2)
(SYNOPSIS)
gcc[option|filename ]...
g++[option|filename ]...
(WARNING)
GNU C,.
,.,Info, Info
.
,.,
Infoman,GNU CC. GNU
man,.
,Info`gcc'Using and Porting GNU CC (for version
2.0) (GNU CC 2.0) .Texinfo gcc.texinfo.
(DESCRIPTION)
CC++.:
(preprocessing),(compilation),(assembly)(linking).
,,:
gcc
(.i)C,C.
g++
(.i)C++,C++.
GCC
:
.c
.C
.cc
.cxx
.m
.i
.ii
.s
.S
.h
C;,,
C++;,,
C++;,,
C++;,,
Objective-C;,,
C;,
C++;,
;
;,
;
(linker).:
.o
.a
(Object file)
(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-intequiv -fexternal-templates -fno-asm -fno-builtin -fhosted -fno-hosted file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (2 of 54)2005-7-9 9:41:47
GCC
ffreestanding -fno-freestanding -fno-strict-prototype -fsignedbitfields -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 -Wenumclash -Werror -Wformat -Wid-clash-len -Wimplicit -Wimplicit-int Wimplicit-function-declaration -Winline -Wlong-long -Wmain -Wmissingprototypes -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-filename=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 -
GCC
GCC
GCC
(Overall Option)
-x language
language ().
,`-x'. language`c', `objectivec', `c-header', `c++', `cpp-output', `assembler',`assembler-with-cpp'.
-x none
,(`-x').
(,,,),`-x'() gcc
,`-c', `-S',`-E'gcc .,(, `-x cppoutput -E')gcc.
-c
,..
, GCC`.o'`.c', `.i', `.s',,.
-o.
GCC-c().
-S
,.,.
, GCC`.o'`.c', `.i',, .-o
.
GCC.
-E
,..
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (6 of 54)2005-7-9 9:41:47
GCC
GCC.
-o file
file.GCC,,,
C.
,,`-o',
.
`-o',:`a.out', `source.suffix '
`source.o', `source.s',C.
-v
().,,.
-pipe
.,
. GNU.
(LANGUAGE OPTIONS)
C "":
-ansi
ANSIC.
GNU CANSI C,asm, inline typeof,
unixvax. ANSI trigraph
,`$'.
`-ansi',, __asm__, __extension__, __inline__
__typeof__. ANSI C,,
, `-ansi'.,__unix__
__vax__, `-ansi',.
`-ansi'ANSI,`-pedantic' `-ansi'
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (7 of 54)2005-7-9 9:41:47
GCC
.
`-ansi',__STRICT_ANSI__. ,
,,ANSI;
.
-fno-asm
asm, inlinetypeof,. __asm__,
__inline____typeof__. `-ansi' `-fno-asm'.
-fno-builtin
(built-in function)._exit,
abort, abs, alloca, cos, exit, fabs, labs, memcmp, memcpy, sin, sqrt,
strcmp, strcpy,strlen.
`-ansi'alloca_exit.
-fhosted
;`-fbuiltin',main.
-ffreestanding
;`-fno-builtin',main.
(:(hosted environment), mainint,
.(freestanding environment)
, main,.gcc)
-fno-strict-prototype
,`int foo ();',C---. (
C++).,fooC++.
-trigraphs
ANSI C trigraphs. `-ansi'`-trigraphs'.
-traditional
C.GNU C,,
GCC
, .
:C++(C), `-traditional', this.
`-fthis-is-variable'.
-traditional-cpp
C., `traditional'.
-fdollars-in-identifiers
(identifier)`$'(C++). `-fno-dollars-inidentifiers'`$'. (GNU C++ `$',
.)
-fenum-int-equiv
int(enumeration)(C++).GNU C++
enumint,.
-fexternal-templates
(template declaration)(C++),
(template function),.,
,`#pragma implementation' ()`#pragma
interface' ().
`-fexternal-templates',(template instantiation)
..typedef,
.,`-fno-external-templates',
.
-fall-virtual
.(newdelete
).
.,
; .
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (9 of 54)2005-7-9 9:41:47
GCC
-fcond-mismatch
.void.
-fthis-is-variable
this(C++).C++, `this'
.,,this. ,
`-fthis-is-variable'.
-funsigned-char
char,unsigned char.
char.unsigned charsigned char .
,,signed charunsigned
char.char,(,
).,,.
charsigned charunsigned char,
.
-fsigned-char
char,signed char.
`-fno-unsigned-char',the negative form of `-funsignedchar'., `-fno-signed-char' `-funsigned-char'.
-fsigned-bitfields
-funsigned-bitfields
-fno-signed-bitfields
-fno-unsigned-bitfields
`signed'`unsigned', (bitfield)
.,,,int, .
,`-traditional',.
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (10 of 54)2005-7-9 9:41:48
GCC
-fwritable-strings
,.,
. `-traditional'.
; ``''.
(Preprocessor Option)
C,,C .
`-E', GCC.`-E' ,
.
-include file
,file,,file.
`-D'`-U'`-include file', .
`-include'`-imacros'.
-imacros file
,file,.file
, `-imacros file'file,
.`-imacrosfile',`-D' `-U',
.`-include' `-imacros'.
-idirafter dir
dir.(`-I')
,.
-iprefix prefix
prefix`-iwithprefix'.
-iwithprefix dir
.prefixdir, prefix`file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (11 of 54)2005-7-9 9:41:48
GCC
iprefix'.
-nostdinc
.`-I'(,).
`-nostdinc'`-I-',.
-nostdinc++
C++,. (`libg++'
.)
-undef
. ().
-E
C.C,.
-C
.`-E'.
-P
`#line'.`-E'.
-M
[ -MG ]
make,.,
make,(target),
(dependency) `#include.,,
`\'-. ,C.
`-M'`-E'.
`-MG',. `-M'
.
-MM
[ -MG ]
`-M',,`#include file"'.
`#include <file>'.
GCC
-MD
`-M',,`.o' `.
d'.---`-MD'`-M'.
Mach`md'`.d',`make' .
-MMD
`-MD',,.
-H
, GCC.
-Aquestion(answer)
,`#if #question(answer)',(Assert)
questionanswer. -A-'.
-Dmacro
macro,`1'.
-Dmacro=defn
macrodefn.`-D' `-U'.
-Umacro
macro. `-U'`-D', `-include'`imacros'.
-dM
().`-E'
.
-dD
,.
-dN
`-dD',.`#define name.
GCC
(ASSEMBLER OPTION)
-Wa,option
option.option,.
(LINKER OPTION)
,. ,.
object-file-name
a special recognized suffix, GCC
. (,).GCC,
.
-llibrary
library.
,`liblibrary.a'.
.
,`-L'.
---(archive file).
:,,,
., ,,
.`-l', `-l`lib'`.a'library,
.
-lobjc
-lObjective C.
-nostartfiles
,.
-nostdlib
..
GCC
-static
(dynamic linking),..
-shared
,..
-symbolic
,.(
`-Xlinker -z -Xlinker defs')..
-Xlinker option
option., GNU CC.
,`-Xlinker',,
. ,`-assert definitions',`-Xlinker -assert -Xlinker
definitions',`-Xlinker "-assert definitions"',
,.
-Wl,option
option.option,.
-u symbol
symbol,. `-u',
,.
(DIRECTORY OPTION)
,,,:
-Idir
dir .
-I`-I-'`-I'`#include "file"';
`#include <file>'.
GCC
`-I'`-I-',
`#include'. (-I.)
, `-I-'()`#include "file"'
.`-I-'. `-I.',
., .
`-I-',, `-I-'`-nostdinc'.
-Ldir
`-l'dir.
-Bprefix
,,.
: `cpp', `cc1' (C++ `cc1plus'), `as'
`ld'.prefix ,`machine/version/'.
,`-B'().,
`-B',`/usr/lib/gcc/' `/usr/local/lib/
gcc-lib/'.,`PATH'
.
,(run-time)`libgcc.a'`-B'.
,,.,
. , `libgcc.a'.
GCC_EXEC_PREFIX;,
.`-B'GCC_EXEC_PREFIX, `-B',
.
(WARNING OPTION)
,,, .
GNU CC:
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (16 of 54)2005-7-9 9:41:48
GCC
-fsyntax-only
,.
-w
.
-Wno-import
#import.
-pedantic
ANSI C;.
,ANSI C(`-ansi'
).,,GNUC.
. ,(pedant).
(`__') `-pedantic'. Pedantic
__extension__.,
.
-pedantic-errors
`-pedantic',.
-W
:
*
(nonvolatile automatic variable)longjmp.
.
setjmp,longjmp,
.,,,
longjmp.
*
,. (),
:
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (17 of 54)2005-7-9 9:41:48
GCC
foo (a)
{
if (a > 0)
return a;
}
GNU CC(abortlongjmp), .
*
(side effect).,
void.,`x[i,j]',`x[(void)i,
j]'.
*
`>'`<='.
-Wimplicit-int
.
-Wimplicit-function-declaration
.
-Wimplicit
-Wimplicit-int-Wimplicit-function-declaration.
-Wmain
main,.,
, int,,.
-Wreturn-type
,int,.
return,void.
-Wunused
,,
, .
-Wswitch
switch,case,
GCC
. ( default.)case
.
-Wcomment
`/*',.
-Wtrigraphs
trigraph ().
-Wformat
printfscanf,.
-Wchar-subscripts
char.,char.
-Wuninitialized
.
,,
. `-O',.
.volatile,
,1, 2, 4, 8.,
, .
,,.,
.
GNU CC,
. :
{
int x;
switch (y)
{
case 1: x = 1;
break;
case 2: x = 4;
break;
case 3: x = 5;
}
foo (x);
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (19 of 54)2005-7-9 9:41:48
GCC
,save_y.
volatile.
-Wparentheses
,.
-Wtemplate-debugging
C++template,(debugging),.
(C++).
-Wall
`-W'.,
`-W...'`-Wall',, ,
"".
-Wtraditional
CANSI C,.
*
.C,ANSI C.
*
(block),.
*
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (20 of 54)2005-7-9 9:41:48
GCC
switchlong.
-Wshadow
,.
-Wid-clash-len
len,.
,.
-Wpointer-arith
(size)void,. GNU C
void *,1.
-Wcast-qual
,.,const char
* char *,.
-Wcast-align
,(alignment),.
, 24,char *int *
, .
-Wwrite-strings
const char[length],, non-const char
*. ,
const,; `-Wall'
.
-Wconversion
,.
,,(default promotion)
.
-Waggregate-return
,. (,
.)
GCC
-Wstrict-prototypes
,. (
, ,.)
-Wmissing-prototypes
,.
. .
-Wmissing-declarations
,.
. .
-Wredundant-decls
,,.
-Wnested-externs
extern,.
-Wenum-clash
(C++).
-Wlong-long
long long ..`-Wno-long-long'
. `-Wlong-long'`-Wno-long-long' `-pedantic'.
-Woverloaded-virtual
(C++.),(type
signature). ,,
:, ,
,.
-Winline
(inline),inline-finline-functions
,.
-Werror
;.
GCC
(DEBUGGING OPTION)
GNU CC,,GCC:
-g
(stabs, COFF, XCOFF,DWARF).. GDB
.
stabs, `-g'GDB;
GDB ,,.
, `-gstabs+', `-gstabs', `-gxcoff+', `-gxcoff', `-gdwarf+',
`-gdwarf' ().
C, GNU CC`-g'`-O'.
:;;
;,.
..
GNU CC,.
-ggdb
(),GDB.
-gstabs
stabs(),GDB.BSDDBX.
-gstabs+
stabs(),GNU(GDB)GNU.
.
-gcoff
COFF().System VSystem VSDB
.
-gxcoff
GCC
XCOFF().IBM RS/6000DBX.
-gxcoff+
XCOFF(),GNU(GDB)GNU.
.
-gdwarf
DWARF().System VSDB.
-gdwarf+
DWARF(),GNU(GDB)GNU.
.
-glevel
-ggdblevel
-gstabslevel
-gcofflevel -gxcofflevel
-gdwarflevel
,level.level2.
Level 1,backtrace.
, .
Level 3,.`-g3',
.
-p
,profile,prof.
-pg
,profile,gprof.
-a
,(basic block)profile,,
tcov.,tcov.GNU gprof
.
GCC
-ax
,'bb.in'profile,profile'bb.
out' . `bb.in'., profile,
, profile.`-'profile.
, `/path/filename.d:functionname'. `bb.out'
. : `__bb_jumps__'(jump)
`bb.out'. `__bb_trace__' `gzip',`bbtrace.gz'
. `__bb_hidecall__'(trace)call . `__bb_showret__'
.
-dletters
,letters(dump)..
(`foo.c.rtl'`foo.c.jump').
-dM
,.
-dN
.
-dD
,.
-dy
(parse).
-dr
RTL`file.rtl'.
-dx
RTL,.`r'.
-dj
`file.jump'.
-ds
CSE (CSE)`file.cse'.
GCC
-dL
`file.loop'.
-dt
CSE(CSE)`file.cse2'.
-df
(flow analysis)`file.flow'.
-dc
(instruction combination)`file.combine'.
-dS
(instruction schedule)`file.sched'.
-dl
`file.lreg'.
-dg
`file.greg'.
-dR
(instruction schedule)`file.sched2'.
-dJ
`file.jump2'.
-dd
(delayed branch scheduling)`file.dbr'.
-dk
-`file.stack'.
-da
.
-dm
,.
-dp
(pattern).
GCC
-fpretend-float
,.,
, GNU CC.
-save-temps
``'';,.,`-c save-temps'`foo.c '` foo.cpp'`foo.s' `foo.o'.
-print-file-name=library
library,---.,
GNU CC,,.
-print-libgcc-file-name
`-print-file-name=libgcc.a'.
-print-prog-name=program
`-print-file-name',program`cpp'.
(OPTIMIZATION OPTION)
:
-O
-O1
.,.
`-O',,.:
,,
, .
`-O',register. `-O'
PCC.
`-O',.
`-O', `-fthread-jumps'`-fdefer-pop' .delay
GCC
GCC
),.
cout << "This " << p << " has " << n << " legs.\n";
., ``''.
, ,. `-fmemoize-lookups'
.
,(), g++
. `-fmemoize-lookups',.`-fsavememoized' ,
, .:
, ,.
-fno-default-inline
,(C++).
-fno-defer-pop
,.,
,.
-fforce-mem
.,
. ,.
.
-fforce-addr
.`-fforce-mem'
..
-fomit-frame-pointer
(frame pointer),.,
;.
.
,Vax,,,
. FRAME_POINTER_REQUIRED.
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (29 of 54)2005-7-9 9:41:48
GCC
-finline-functions
.,.
,static,GCC
.
-fcaller-saves
,,GCC,
..
,.
-fkeep-inline-functions
,static,,
.
-fno-function-cse
;.
,,hack,,
.
-fno-peephole
peephole.
-ffast-math
,GCCANSIIEEE/.,sqrt
.
`-O',IEEEANSI/,
.
. `-O2',`-funroll-loops' `funroll-all-loops'.
GCC
`-O'`-fthread-jumps'`-fdelayed-branch' ,
.
``'',.
-fstrength-reduce
(loop strength reduction),.
-fthread-jumps
,,
, .truefalse,
.
-funroll-loops
(loop unrolling)..
-funroll-all-loops
(loop unrolling)...
-fcse-follow-jumps
(common subexpression elimination),
,jump.,CSEelseif,
false, CSEjump.
-fcse-skip-blocks
`-fcse-follow-jumps',CSE,
(block).CSEif,else, `-fcse-skip-blocks'
CSEif.
-frerun-cse-after-loop
,.
-felide-constructors
(C++).,, GNU C++
foo y,:
GCC
(TARGET OPTION)
, GNU CC., .
,,GNU CC.`-b' .
,GNU CC.(),
.
-b machine
machine.GNU CC.
machineGNU CC.,
GCC
GCC
-m68030
68030.68030,.
-m68040
68040.68040,.
-m68020-40
68040,.68020/68881,68030
68040.
-mfpa
SUN FPA.
-msoft-float
. :GNU CC.GCC
C ,.
.
-mshort
int16,short int.
-mnobitfield
(bit-field). `-m68000'`-mnobitfield'.
-mbitfield
. `-m68020'`-mbitfield'.gcc,
.
-mrtd
,,rtd,
. ,.
UNIX.UNIX,
.
,(printf);
.
GCC
,,. (,
.)
6801068020rtd,68000.
VAX`-m':
-munix
(aobleq), VAXUNIX(long ranges)
.
-mgnu
GNU,,
-mg
g-format,d-format.
SPARC`-m':
-mfpu
-mhard-float
..
-mno-fpu
-msoft-float
. :SPARCGNU.C
,.,.
-msoft-float;.
-mno-epilogue
-mepilogue
-mepilogue (),.
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (35 of 54)2005-7-9 9:41:49
GCC
(Creturn).
-mno-epilogue,.
-mno-v8
-mv8
-msparclite
SPARC.
(Fujitsu SPARClite), GCCSPARC v7.
-mv8SPARC v8.v7,,
SPARC v8,v7.
-msparcliteSPARClite.SPARClite,
(integer divide step and scan (ffs)). v7.
-mcypress
-msupersparc
,.
-mcypress()Cypress CY7C602, SparcStation/
SparcServer 3xx.SparcStation 1, 2, IPX
..
-msupersparcSuperSparc, SparcStation 10, 1000
2000.SPARC v8.
Convex`-m':
-mc1
C1.C1,.
-mc2
GCC
C2.C2,.
-margcount
(argument count word).Convex
Vax . (,;
.)
-mnoargcount
.gcc,.
AMD Am29000`-m':
-mdw
DW,,..
-mnodw
DW.
-mbw
..
-mnbw
.`-mnodw'.
-msmall
,256 KB,
256K. callconst, consth, calli.
-mlarge
call;.
-m29050
Am29050.
-m29000
Am29000..
-mkernel-registers
gr64-gr95gr96-gr127. ,
GCC
,.
,, `-f'normal, user-mode, names.
-muser-registers
gr96-gr127..
-mstack-check
__msp_check..
Motorola 88K`-m':
-m88000
m88100m88110.
-m88100
m88100,m88110.
-m88110
m88110,m88100.
-midentify-revision
ident,,,,
,
-mno-underscores
,..
-mno-check-zero-division
-mcheck-zero-division
88K,.
( ),,. GCC88K
`-mcheck-zero-division'.
-mocs-debug-info
-mno-ocs-debug-info
()(), 88Open Object
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (38 of 54)2005-7-9 9:41:49
GCC
-mserialize-volatile
-mno-serialize-volatile
,.
, GNU CC.
.
m88100,.`-m88100',
GNU CC .
m88110.
GCC
GCC
-mwarn-passed-structs
, GCC.C,
, ., GCC.
IBM RS6000:
-mfp-in-toc
-mno-fp-in-toc
(TOC),.,
GCC ;TOC, `-mno-fp-in-toc'TOC,
.
`-m'IBM RT PC:
-min-line-mul
..
-mcall-lib-mul
lmul$$ .
-mfull-fp-blocks
,IBM(scratch space)..
-mminimum-fp-blocks
.,
.
-mfp-arg-in-fpregs
IBM,.,,
varargs.hstdargs.h.
-mfp-arg-in-gregs
..
-mhc-struct-return
GCC
GCC
GNU.OSF/1,OSF/rose.
-mrnames
-mno-rnames
-mrnamesMIPS,(, a0
$4). GNU-mrnames,MIPSMIPS C. mno-rnames.
-mgpopt
-mno-gpopt
-mgpopt,MIPS
(short global or static data items)
. ,.
-mstats
-mno-stats
(non-inline function), -mstats
(,,).
-mmemcpy
-mno-memcpy
-mmemcpystring(memcpy bcopy),
.
-mmips-tfile
-mno-mips-tfile
MIPSmips-tfile(), -mno-mips-tfile
mips-tfile(postprocess). mips-tfile
., stage2stage3 ,,
.
-msoft-float
. : GNU CC.C
, ,,.
GCC
-mhard-float
.,.
-mfp64
FR(on),32 64-bit,32 32-bit
.-mcpu=r4000-mips3.
-mfp32
32 32-bit..
-mabicalls
-mno-abicalls
() .abicalls, .cpload,.cprestore, System V.4
.
-mhalf-pic
-mno-half-pic
-mhalf-pic,,.
.
-G num
numbss,bss.
(gp$28),.
, MIPSnum8,GNU0., -Gnum .
-Gnum.
-nocpp
(`.s'),MIPS.
`-m'Intel 80386: -m486
-mno-486
486.
-msoft-float
GCC
. : GNU CC.C
, ,,.
80387,`-msoft-float',
.
-mno-fp-ret-in-387
FPU.
floatdoubleFPU,FPU.
FPU.
`-mno-fp-ret-in-387'CPU.
`-m'HPPA:
-mpa-risc-1-0
PA 1.0.
-mpa-risc-1-1
PA 1.1.
-mkernel
.add,DP;addil add
.HP-UXbug.
-mshared-libs
HP-UX.,PA.
.
-mno-shared-libs
HP-UX.PA.
-mlong-calls
,256K.
, ``branch out of range errors``.
-mdisable-fpregs
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (45 of 54)2005-7-9 9:41:49
GCC
.,
. ,.
-mdisable-indexing
(indexing address mode).MACHMIG
, .
-mtrailing-colon
(label definition)(ELF).
`-m'Intel 80960:
-mcpu-type
cpu-type ,,. cpu-type
kb;ka, mc, ca, cf, sa,sb.
-mnumerics
-msoft-float
-mnumerics. -msoft-float
.
-mleaf-procedures
-mno-leaf-procedures
()(leaf procedure),balcall .
,bal,,
,,.
-mtail-call
-mno-tail-call
()(),(tailrecursive). ,.-mnotail-call.
-mcomplex-addr
-mno-complex-addr
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (46 of 54)2005-7-9 9:41:49
GCC
GCC
,Alpha.
-mfp-reg
-mno-fp-regs
(). -mno-fp-regs-msoft-float
.,,$0
$f0. ,,-mno-fp-regs
, .
,,.
System V,:
-G
SVr4, gcc`-G'(). `symbolic'`-shared',gcc.
-Qy
,.ident.
-Qn
.ident().
-YP,dirs
`-l',dirs.dirs .
-Ym,dir
dirM4..
GCC
-fnonnull-objects
(reference)null (C++).
, GNU C++.,a
null:
obj &a = g (); a.f (2);
,.,
`-fnonnull-objects'.
-fpcc-struct-return
structunion,.,
,;GCCPCC
.
-freg-struct-return
structunion., -fpcc-structreturn.
-fpcc-struct-return ,-freg-struct-return, GNU CC
., GNU CC-fpcc-struct-return.
-fshort-enums
enum., enum
.
-fshort-double
doublefloat.
-fshared-data
const,.
, ,.
-fno-common
GCC
bss,(common block)
. ,(extern ),
. ,,
.
-fno-ident
`#ident'.
-fno-gnu-linker
(C++)GNU(GNU
).GNU,GNU
collect2 (constructor)(destructor). (GNU
CCcollect2 .)collect2,gcc
.
-finhibit-size-directive
.size,,,
. `crtstuff.c';.
-fverbose-asm
.(
).
-fvolatile
(volatile).
-fvolatile-global
.
-fpic
,.(shared library).
-fPIC
,.(dynamic linking),
.
-ffixed-reg
GCC
reg(fixed register);(
,,).
reg.,REGISTER_NAMES
.
,.
-fcall-used-reg
reg,.,
.reg.
,,
.
,.
-fcall-saved-reg
reg.,
.reg.
,,
.
.
,.
PRAGMAS
GNU C++`#pragma':,
.
#pragma interface
file:///E|/BOOK//Linux/Linhan QQ-3335231 E-mail - ningyuanbin@163.com.htm (51 of 54)2005-7-9 9:41:49
GCC
(C++),.
, (,,)
. pragma.
`#pragma interface', (
`#pragma implementation').,
(reference).
#pragma implementation
#pragma implementation "objects.h"
(C++)(),
pragma. `#pragma interface'.implementation
,,.
`#pragma implementation',;
, `allclass.cc', `#pragma implementation'`#pragma implementation
allclass.h'.implementation,
.
implementation.
(FILE)
file.c
file.h
file.i
file.C
file.cc
file.cxx
file.m
file.s
file.o
a.out
TMPDIR/cc*
LIBDIR/cpp
C
C()
C
C++
C++
C++
Objective-C
GCC
LIBDIR/cc1
C
LIBDIR/cc1plus
C++
LIBDIR/collect
(front end)
LIBDIR/libgcc.a
GCC(subroutine)
/lib/crt[01n].o
(start-up)
LIBDIR/ccrt0
C++
/lib/libc.a
C,intro (3)
/usr/include
#include
LIBDIR/include
#includegcc
LIBDIR/g++-include #includeg++
LIBDIR/usr/local/lib/machine/version.
TMPDIRTMPDIR (,/usr/tmp , /tmp).
(SEE ALSO)
cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1).
info `gcc', `cpp', `as', `ld',`gdb'.
Using and Porting GNU CC (for version 2.0), Richard M. Stallman; The C
Preprocessor, Richard M. Stallman; Debugging with GDB: the GNU Source-Level
Debugger, Richard M. StallmanRoland H. Pesch; Using as: the GNU Assembler,
Dean Elsner, Jay Fenlason & friends; ld: the GNU linker, Steve Chamberlain
Roland Pesch.
BUGS
GCC.
(COPYING)
Copyright 1991, 1992, 1993 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this manual
provided the copyright notice and this permission notice are preserved on all
copies.
GCC