GCC Chinese MANUAL: Xu Source: Unknown Hits: 40 Update Time: 2004-12-7 GCCSection: GNU Tools (1) Updated: 2003/12 / 05Index Return to Main Contents --------- -------------------------------------------------- --------------------- Namegcc, G - GNU Enginee C and C Compiler (Synopsis) GCC [option | filename] ... G [option | filename] ...
WARNING This manual page is taken from the full document of the GNU C compiler, which is limited to the meaning of the explanation option. This book page is no longer updated unless someone voluntarily maintained. If you find that the man page and the software have contradictory, please Check the Info file, the Info file is an authoritative document.
If we find that the content of this handbook causes obvious chaos and complaints due to outdated, we stop posting it. It is impossible to have other options, and the information updated in the INFO file is updated at the same time, because other maintenance GNU CC does not leave We do this. The GNU project believes that the Man's manual is an outdated product, and the time should be used in other places.
If you need full and up-to-date documentation, review info files `GCC 'or use and porting gnu cc (for version 2.0) (for Version 2.0) manual. Both are from Texinfo original file gcc.texinfo.
Description (Description) C and C compilers are integrated. They all use one or more of the four steps to input files: preProcessing, compilation, assembly, assembly (Linking) The source file is later labeled the language of the source file, but for the compiler, the suffix name controls the default setting: GCC believes that the pre-processed file (.I) is a C file, and sets the C-form connection. G believes that the pre-processed file (.i) is a C file, and sets the connection of C . The source file suffix name indicates the language type and the later operation:
.C C source program; pretreatment, compilation, assembly .c C source program; pre-processing, compile, assembly .cc C source program; pre-processing, compilation, assembly .cxx C source program; pretreatment, compilation, assembly .m Objective-c source program; pre-processing, compile, assembly. I pre-processed C file; compile, assembly. Ii pre-processed C file; compile, assembly .s assembly language source program; assembly .s assembly language source program ; Pretreatment, assembly .h pre-preparation file; usually do not appear on the command line
The files of other retrore names are passed to the connector. It usually includes:
.o target file (Object file) .A Archive File
Unless the -c, -s, or -e option (or compiling errors blocked the complete process), the connection is always the final step. In the connection phase, all the .o files, -l library corresponding to the source program Files, unrecognized file names (including specified .o target files and .a library files) are passed to the connector in the order in the command line.
Options (options) options must be given: `-dr 'is completely different from` -d -r'. Most `-f 'and` -w' options have two opposite formats: -fname and -fno-name (Or -wname and -wno-name). Only the format that is not the default option is not listed here.
Below is a summary of all options, groups, explains in the later chapter.
Overall Option
-c -s -e -o file -pipe -v -x language language option (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 (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 debug option (debugging option) -a -dletters -fpreten D-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 options (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-FormE-Pointer -fractalun- Cse -After-loop -fschedule-insns -fschedule-insns2 -fstreamth-reduuce -ft-ousread-jumps -funroll-all-loops -funroll-loops -o -o2 -O3 Preprocessor option (predessor option) -aassertion -c DD -DM -DN-DMACRO [= DEFN] -E-H -IDIRAFTER DIR -IPREFIX FILE-IWITHPREFIX DIR -M -MD -MM -MMD -NOSTDINC -P-MM-MMD -NOSTDINC -P -UMACRO -UNDEF assembler option ( Assembler Option) -wa, Option Connector Option (Linker Option) -llibrary -nostartfiles -nostdlib -static -shared -symbolic -xlinker option (Directory Option) -bprefix -idir -i-- LDIR Target Options (Target Option) -b Machine -V Version Configuration Related Options (Configuration Dependent Option) M680x0 Options - M68000 -M68020 -M68020-40 -M68030 -MBITFIELD -MC68000 -MC68020 -MFPA -MNOBITFIELD-MRTD -MSHORT -MSOFT-FLOAT VAX Options -Mg-MGNu -MunixSPARC Options -mepilogue -Mfpu -Mhard-float -Mno-FPU Mno-epilogue-msoft-float -msparclite -mv8 -msupersparc-MCypress
ConveX options - MARGCOUNT -MC1 -MC2 -MNOARGCOUNT
AMD29K options - M29000 -M29050 -MBW -MDW -MKERNEL-Registers -mlarge -Mnbw -Mnodw -msmall -Mstack-Check -Muser-Registers
M88K Options - MNO-LARGE-SHIFT - MNO-OCS-OCS-DEBUG-INFO-MNO-OCS-FRAME -POSition -Mno-Optimize-arg-alla-mno-serialize-Volatile -Mno-undrees -mocs-debug-info -mocs-frame-position -moptimize-arg-alla-mSerialize-Volatile -Mshort-data-num -MSVR3 -MSVR4-MTRAP-LARGE-SHIFT -MUSE-DIV-INSTRUCTION -MVERSION-03.00 -MWARN-PaSSED-STRUCTS6000 Options -MFP-in-Toc -Mno-Fop-in-TOC
RT option-mcall-lib-mul-mfp-arg-in-fpregs -mfp-arg-in-gregs -mFull-fp-block-MHC-STRUCT-RETURN -MIN-line-mul-mminimum-fp-block-mminohc -Struct-Return
MIPS Options - MCPU = CPU TYPE -MIPS2 -MIPS3-MINT64 -MLONG64 -MMIPS-AS -MGAS -MRNAMES -MNO-RNAMES -MGPOPT -MNO-GPOPT -MSTATS -MNO-STATS -MMEMCPY -MNO-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 option-M486 -MNO-486 -MSOFT-FLOAT -MNO-FP-RET-IN-387
HPPA Options - MPA-RISC-1-0 -MPA-RISC-1-1 -Mkernel -Mshared-Libs -Mno-Shared-Libs -mlong-Calls -Mdisable-fpregs-Mdisable-Indexing -mtrailing-Colon
I960 Options-MnUMTAIL-MNODE-TAIL-CALL-MNODE - MNO-CALL-MNODE - MNO-CALL-MNO-MNO - MNO-code -Align -Mic-compat -Mic2.0-compat -Mic3.0-compat -masm-compat -mintel-asm-mstrict-align-mno-strict-align -mold-align-mald-align
DEC Alpha option - mfp-regs-malo-fp-regs-maloat-float-msoft-float
SYSTEM V option -g -qy -qn -yp, paths -ym, dir
Code Generation Option (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 Overall Options (OVERALL OPTION) -X Language clearly points out later input files The language is Language (not the default selection obtained from the file name suffix). This option applies to all the input files later until the next `-x 'option. Language has an optional value with` C', `Objective -c ', `c-header',` CPP-OUTPUT ', `Assembler', and` assembler-with-cpp '. -x None Close any clear statement of the language, therefore based on file name suffix processing The following files (as if you never use the `-x 'option). If you only operate some of the four phases (pre-pre-processing, compile, assembly, connection), you can use the` -x' option (or file name suffix) ) Tell GCC where to start, use `-c ',` -s', or `-e 'option to tell where to end. Note that some options (for example,` -x cpp-outprut -e') GCC does not make anything.
-c compiled or assemble source files, but does nothing. The compiler outputs a target file corresponding to the source file. By default, GCC is used to replace the source file name suffix `.c ',` .i', `.s', wait, generate a target file name. You can use the -o option to select another name.
The GCC ignores the -c option, any unrecognized input file (they don't need to be compiled or assembled).
After -S compile, it is stopped. For each input non-assembly language file, the output file is a compilation language file. By default, GCC is used to replace the source file name suffix `.c ', `.i ', wait, generate a target file name. You can use the -o option to select another name.
GCC ignores any input files that do not need to be compiled.
-E is stopped, it is stopped, and does not compile. The pre-processed code is sent to standard output. GCC ignores any input files that do not require pre-processing.
-o file specifies the output file to file. This option does not care what the GCC generates. Whether it is an executable file, a target file, a compiler or a pre-processed C code. Since only one output file can be specified, compiling multiple input files When using the `-o 'option, it is meaningless unless an executable is output.
If you do not use the `-o 'option, the default output result is: the executable file is` a.out', `source.suffix 'target file is` source.o', assembled file is `Source.s', and The pre-processed C source code is sent to the standard output.
-v (in Standard Error) Displays a command to perform the compile stage. At the same time, the compiler driver, the preprocessor, the compiler version number is displayed. -pipe uses the pipe in different stages of the compilation process to communicate with the temporary file. This Options cannot work on some systems because the assemblers of those systems cannot read data from the pipe. The GNU's assembler does not have this problem.
Language Options The following options Control compiler Accept C "dialect": -ansi supports the ANSI standard C program. This will close some of the non-compatible ANSI C in GNU C, such as ASM, Inline and TypeOf keywords, as well as a predefined macro, such as UNIX and VAX, indicating the current system type. At the same time, open unwelcome and very few ANSI TRIGRAPH features, and part of US $ 'is identifier. Although useful` -ansi 'Options, below these optional keywords, __asm__, __extension____inline__ and __typeof__ is still valid. Of course, you will not use them in the ANSI C program, but you can put them in the header file because compile When these header files, you may specify the `-ansi 'option. Other predefined macros, such as __unix__ and __vax__, whether or not there is a` -ansi' option, always valid.
Using the `-ansi 'option does not automatically reject the non-ANSI program unless added to the` -pedant' option as a supplement to the `-ansi 'option.
When using the `-ansi 'option, the preprocessor will preview a __strict_ansi__ macro. Some headers pay attention to this macro to avoid declaring certain functions, or avoid defining certain macros, these functions and macro are not called by ANSI standards This will not interfere with the programs that use these names elsewhere.
-fno-ASM does not treat ASM, Inline or TypeOf as a keyword, so these words can be used as an identifier. Use __ASM__, __inline__ and __typeof__ to replace them. `-ansi 'hidden declarations` -fno -ASM '. -fno-builtin does not accept built-in function that is not two underscores. The currently affected function has _exit, Abort, ABS, Alloca, Cos, Exit, Fabs, Labs, Memcmp , Memcpy, SiN, SQRT, STRCMP, STRCPY, and STRLEN. `-ansi 'options prevent alloca and _exit from built a built-in function.
-FHOSTED is compiled according to the host environment; he hides the `-fbuiltin option, and warns the incorrect main function declaration. -ffreeStanding is compiled by the independent environment; he hides the declaration of` -fno-builtin 'option, and to Main There is no special request. (Translation: Host Environment) All standard libraries can be used, the main function returns an int value, typical example is almost all programs other than the kernel. The corresponding independent environment (free environment does not exist) The library, the program entry is not necessarily Main, the most obvious example is the operating system kernel. Details reference information recently by the GCC website)
-fno-strict-protoy is declared for a function that does not have parameters, such as `Int foo (); ', press C-style, that is, the number or type of parameters is not explained. (for C ). Under normal circumstances, such The function foo means that the parameters are empty in C .
-trigraphs supports ANSI C trigraphs. `-ansi 'options implicitly declared` -trigraphs'.
-traditional tries to support some aspects of traditional C compilers. See the GNU C manual. We have deleted the details list here. Not c), `-traditional 'options bring an additional effect, allowing this assignment. His effect is the same as the` -fthis-is-variable' option.
-traditional-CPP is trying to support some aspects of traditional C pre-regulators. In particular, the contents of the pre-processor are mentioned above, but other effects that do not include the `-traditional 'option.
-fdollars-in-identifiers allows for use in an identifier (Identifier) (only for C ). You can specify the `-fno-dollars-in-identifiers 'option to disable the use of` $'. (GNU C Allows the `$ 'character to be allowed by certain target systems, but not all systems.)
-fenum-int-equiv allows INT type to an implicit conversion of enumeration type (C only). Under normal circumstances, GNU C allows for conversion from enum to int.
-Fexternal-Templates produces smaller code (C only) for template declaration (only C ), and the method is for each template function, which only generates a copy of their place. I want to successfully use this option. You must mark the `#pragma implementation '(definition) or` #pragma interface' (declaration) in all files that use templates. When the program is compiled with `-fexternal-templates', all the template instances are all External type. You must make the instance you need to appear in the implementation file. You can implement this with TypeDef. He references each instance you need. Comparison, if you compile, use the default options `-fno-external-templates' All template instances are explicitly set to built-in.
-fall-virtual All possible members function defaults to virtual functions. All member functions (except for constructor functions and New or DELETE member operators) are deemed as virtual functions. This does not indicate that each call member function will pass Internal virtual function table. In some cases, the compiler can determine that you can call some virtual functions directly; then call it directly.
-fcond-mismatch allows the types of the second and third parameters of the conditional expression that do not match. This expression of this expression is Void.
-fthis-is-variable allows this assignment (only C only). Merge user-defined free storage management mechanisms to C , make the assignable `this' looks no time. Therefore, by default, the class member function is internally This assignment is an invalidation. However, in order to backward compatibility, you can make this operation valid through the `-fthis-is-variable 'option.
-funsigned-char Ring CHAR is defined as unsigned type, like unsigned char. Various machines have their own default char types. It may be unsigned char or Signed Char.
Ideally, a portable program always uses signed char or unsigned char. But many programs have been written as only simple char, and look forward to this is the number of symbols (or no sign) The specific situation depends on the target machine of the program. This option, and its antisense option, so that the program works on the corresponding default value.
Char types should always be explicitly defined as signed char or unsigned char, even if it is exactly the same.
-fsigned-char The char is defined as a symbol type, like Signed Char. This option is equivalent to `-fno-unsigned-char ', he is the opposite option of The Negative Form of` -Funsigned-Char'. Similarly, `-fno -Signed-char 'is equivalent to `-funsigned-char'.
-fsigned-bitfields -funsigned-bitfields -fno-signed-bitfields -fno-unsigned-bitfields If there is no clear declaration `Signed 'or` UNSIGNED' modifier, these options are used to define a symbolic bitmaster (Bitfield) or unmanifestinal. Domain. By default, the bit field is a symbol because they inherit the basic integer type, such as int, is a sign number. However, if the `-traditional 'option is specified, the bit field is always unsigned. FWRITABLE-STRINGS stores string constants to writeable data segments, and does not do special treatments. This is to compatibility with some old programs, they assume string constants to be writable. `-traditional 'option also has the same effect. Tampering strings Constant is a very bad idea; `` constant '' should be constant.
Preprocessor Option The following options For the C predecessor, the preprocessor is used to handle the C source file before formally compiling. If you specify the `-e 'option, the GCC is only preprocessing. Some options must be made together with the `-e 'option because their output results cannot be used to compile.
-include file before processing the regular input file, the result is that the contents of the file file are first compiled. The command line is handed over to the `-d 'and` -u' option forever before `-Include file '. Whether it is in the order on the command line. However, `-include 'and` -imacros' option handles sequentially.
-imacros file before processing a regular input file, but ignore the output result. Since the output content of the file file is discarded, the unique effect of `-imacros file 'option is to make the macro definition in the file file take effect, you can use Other input files. Before processing the `-imacrosfile 'option, the preparation will process the` -d' and `-u 'option, which does not care about their order on the command line. Hower` -include' and `-imcros' The option is handled in writing order.
-idirafter DIR Adds the directory DIR to the second included path. If a header is not found in the primary containing path (with a `-i 'added path), the preprocessor searches the second included path.
-ipRefix prefix Specifies Prefix as a prefix of subsequent `-iwithprefix 'options.
-iwithPRefix Dir Adds the directory to the second included path. The directory name is merged by Prefix and DIR, where Prefix is specified by the previous `-iprefix 'option.
-nostdinc Don't look for header files in the standard system directory. Search only for `-i 'options specified (and the current directory, if appropriate). Combine with the` -nostdinc' and `-i- 'option, you can contain files Search is limited to the explicit specified directory.
-nostdinc Do not look for headers in the C dedicated standard directory, but still search for other standard directories. (Use this option when establishing `libg '.) -undef Don't predefine any non-standard macro. (including system structure flag).
-E only runs the C pre-regulator. Prerequisites all specified C source files, and the result is sent to standard output or specified output file.
-C tells the pre-processor not to discard the comment. Team with `-e 'options.
-P tells the pre-processor not to generate a `#Line 'command. Cooperate with` -e' options.
-M [-mg] tells the pre-processor to output a rule that is suitable for Make to describe the dependencies of the target files. For each source file, the preprocessor outputs an MAKE rule, the target item of the rule (Target) is The target file name corresponding to the source file, dependency (dependency) is the files in the `#include reference in the source file. The generated rules can be single line, but if too long, use` / '- Renewal to make multiple lines. Rule display In the standard output, do not produce a pre-processed C program. `-M 'implies the` -e' option. `-Mg 'requires the deleted header file to be treated, and assume that they and source files in the same directory Next. Must be used with the `-m 'option.
-Mm [-mg] and `-m 'option, but the output result involves only the user's header file, like this` #include file ". Ignore the system header file such as` #include
-Md and `-m 'option, but the dependency information is output in the file, the file name is generated by replacing the value of the output file name to` `'` More to continue the designated compilation ---` -Md 'is not like `-m', preventing normal compilation tasks. Mach's utility` MD 'can merge the `.d' file, generate a single dependency file that applies to` make 'commands.
-Mmd and `-md 'options, but the output results involve only user header files, ignore the system header file.
--H In addition to other common operations, GCC displays the referenced header names.
-Aquestion (Answer) If the pre-processor is conditional test, such as `#if #question (Answer), this option can assert (Assert) Question's answer is answer. -A- 'Turns the standard for describing the target assertion.
-Dmacro defines macro Macro, the content of the macro is defined as a string `1 '.
-Dmacro = DEFN Defines the content of macro Macro to defn. All `-d 'option on the command line is processed before the` -u' option.
-Umacro cancels the macro. `-U 'option After all` -d' options, it is precedeed to any `-include 'or` -imacros' option.
-dm tells the pre-processor output a valid macro definition list (a valid macro definition when the pre-processing is completed). This option needs to be used in combination with the `-e 'option.
-dd tells the pre-processor to transfer all macro definitions to the output, and display in the order of appearance.
-dn and `-dd 'options, but ignore macro parameters. Only displayed on the output side. #define name.
Assembler Option - WA, Option passes the option option to the assembler. If Option contains a comma, you are divided into multiple options in a comma.
The options below the connector option (Linker Option) The following options are used to connect the target file and output the executable file. If the compiler does not connect, they are meaningless.
Object-file-name If some files do not specifically clear the suffix A Special Recognized Suffix, GCC thinks they are target files or library files. (Depending on the file content, the connector can distinguish between the target file and library file). If the GCC is connected Operation, these target files will become the input file of the connector.
-llibrary is a library file named library. The connector is looking for this library file in the standard search directory, the real name of the library file is `library.a '. The connector will reference this file when making a file name.
Search Directory In addition to some system standard directories, the path specified by the user in `-l 'option is included.
Generally speaking, the file found by this method is the library file - that is, the archive file consisting of the target file. The method of connecting the archive file is: Scan the archive, find some members, the symbols of these members It has been referenced, but it has not been defined. However, if the connector finds a normal target file, not the library file, connect this target file in a usual way. Specify the uniqueness of the `-l 'option and the specified file name The difference is that the `-l option is wrapped with` lib 'and ``', and searches for some directories. The special form of the-lobjc This -l option is used to connect the Objective C program.
-nostartfiles does not connect to the system standard startup file, and the standard library file is still working properly.
-NostDLIB does not connect to the system standard launch file and standard library file. The specified file is passed to the connector.
-static Onlines supporting dynamic linking, blocks the connection sharing library. This option is invalid on other systems.
-shared generates a shared target file, he can generate an executable with other target files. Only some system supports this option.
-ssymbolic When you share the shared target file, bind the reference to the global symbol. WARNING is made to all unconfilled references (unless you use the connection editing options `-Xlinker -z -Xlinker defs' replacement). Only some of the system supports this option .
-Xlinker option passes the option option to the connector. You can use the system-specific connection options, and the GNU CC cannot recognize these options. If you need to pass the parameters, you must use two `-xlinker ', one pass option, Another time to pass his parameters. For example, if you pass the `-assert definitions ', you must write a` -xlinker -assert -Xlinker definitions', instead of writing a `-xlinker" -assert definitions ", because this will put the entire string When making a parameter transmission, it is obvious that this is not the connector looks forward.
-Wl, Option transmits option option to the connector. If you contain a comma in Option, you are divided into multiple options at a comma.
-u symbol makes the connector to cancel the symbol definition of Symbol to connect to the library module to obtain a definition. You can use multiple `-u 'options, each keep up with different symbols, so that the connector is transferred to the additional library module.
Directory Option The following options Specify some of the search paths to find some members of the header file, library file, or compiler: -IDIR Add a DIR directory in the search path list of header files.
-I- Any search path specified in `-i- 'front and` -i' option is only available to `#include" file "'case; they can't be used to search for` #include
Also, `-i- 'option prevents the current directory (where to store the current input file) becomes the first choice for search` #include "file"'. There is no way to overcome the effect of `-i- 'option. You can Specify the `-i. 'Search that directory, it is the current directory when calling the compiler. This is not exactly exactly the default behavior of the preprocessor, but the result is usually satisfactory.
`-I- 'does not affect the use of system standard catalogs, so` -i-' and `-nostdinc 'is different options.
-Ldir adds a DIR directory in the search path list of `-l 'options.
-BpRefix This option indicates where to find executable files, library files, and compilers their own data files. Compiler drivers need to perform some of the subroutines below: `CPP ',` CC1' (or C ` CC1PLUS '), `as' and` ld '. He will prefix the prefix of the program that is performed by the program, can include or not include `Machine / Version /'. For subroutines to run, the compiler driver first test Plus the `-b 'prefix (if present). If the file is not found, or if you don't specify the` -b' option, the compiler will then test two standard prefix `/ usr / lib / gcc / 'and` / usr / Local / lib / gcc-lib / '. If you still haven't find the required file, the compiler is looking for file names that do not add any prefix in the path specified by `path' environment variable.
If there is a need, run-time support file `libgcc.a 'is also within the search range of` -b' prefix. If you are not found here, you are looking for the two standard prefix mentioned above, only This is not. If the above method does not find this file, it will not connect to him. Most of the machines, `libgcc.a 'is not a little less.
You can get an approximation effect through environment variables, gcc_exec_prefix; if this variable is defined, its value is prefixed as above. If you specify the `-b 'option and GCC_EXEC_PREFIX variable, the compiler first uses` -b' Options, and then try the environment variable.
WARNING OPTION WARNING is a diagnostic information for the program structure, and the program does not necessarily have an error, but there is a risk, or there may be an error. The following options control the number and type of warning generated by the GNU CC:
-fsyntax-only check the syntax error in the program, but does not generate output information. -W prohibits all warning messages. -wno-import prohibits all warning information about #import. -pedantic opens all warnings required to completely take the ANSI C standard Diagnosis; refusal to accept procedures that have been prohibited. Whether there is this option, compliance with the ANSI C standard should be able to be correctly compiled (although the very few programs need to be `-ansi 'option). However, if this option is not available Some GNU extensions and traditional C features are also supported. Use this option to reject these programs. There is no reason to use this option, he exists just to meet some nerds (PEDANT).
For alternative keywords (they start and end with `__ ')` -pedant' does not generate warning information. Pedantic does not warn the expression behind __extension__. But only use this in the system header file. Semicament measures, the application is best to avoid.
-pedantic-errors This option and `-pedantic 'are similar, but display errors rather than warnings. -W shows additional warning information on the following events: * Nonvolatile Automatic Variable may change when calling longjmp. These warnings only occur when optimizing compile. The compiler only knows the call to SetJMP, he can't know where to call Longjmp, in fact, a signal processing routine can call him anywhere in the program. The result is that the program is There is no problem, you may also get a warning because you cannot call Longjmp on where you may have problems.
* Other functions can be returned, or a function of the value can also be returned. (The missing function body is considered to be not returned), for example, the following function will cause this warning:
Foo (a) {if (a> 0) Return A;
Since the GNU CC does not know that some functions never return (including Abort and longjmp), there may be a false warning.
* There is no effect in the left side of the expression statement or comma expression. If you want to prevent this warning, you should force the unused expression to convert to a Void type. For example, such an expression `x [i, j] 'can cause warnings, and `x [(void) i, j]' will not. * No symbol number with`> 'or `<=' and zero comparison.
-WImplicit-int warn does not have a declaration of the specified type.
-WImplicit-function-Declaration WARNING functions used before the declaration.
-WImplicit with -WIMPLICIT-INT and -WIMPLICIT-FUNCTION-DECLAration.
-Wmain If the main function declares or defines a strange type, the compiler will issue a warning. Typically, this function is used for external connections, returns the INT value, does not require parameters, or specify two parameters.
-Wreturn-type If the function defines the return type, the default type is an int type, the compiler issues a warning. At the same time, warn the Return statement without the return value, if the functions they belong are not the Void type.
-Wunused If a local variable is not used in addition to the declaration, or declare the static function but does not define, or the compiler will issue a warning for the compiler.
-Wswitch If the parameters of a Switch statement belong to an enumeration type, no corresponding CASE statement uses enumeration elements, the compiler will issue a warning. (The appearance of the default statement prevents this warning.) Exceeding the enumerated range of CASE statements It will cause this warning.
-Wcomment If the start sequence `/ * 'appears in the comment, the compiler will issue a warning.
-Wtrigraphs WARNING Trigraph (assuming allows them).
-Wformat Checks the call to functions such as Printf and Scanf, confirming the consistency of each parameter type and format string.
-Wchar-subscripts WARNING Type is the array subscript of char. This is a common error. Programmers often forget to have a symbol on some machines.
-WunInitialized uses automatic variables before initialization. These warnings may only do optimize compile time, because they need data stream information, only to estimate data flow information when optimized. If you do not specify the `-o 'option, it will not These warnings appear.
These warnings are only for variables of the allocated register. Therefore, there is no such thing as the variable that is declared as Volatile, and the variable that has been acquired, or the length is not equal to 1, 2, 4, and 8 bytes. Also also Will not occur on the structure, a combination or array, even if they are in the register.
Note that if a variable only calculates a value that has never been used, this may not be warned. Because such computing has been deleted by data stream analysis before displaying a warning.
These warnings are optional because the GNU CC has not smart to discriminate all the cases, knowing some of the code that looks wrong is actually correct. The following is an example:
{INT X; Switch (Y) {case 1: x = 1; Break; Case 2: x = 4; Break; Case 3: x = 5;} foo (x);}
If Y always is 1, 2 or 3, then x will always be initialized, but the GNU CC does not know this. The following is another universal case:
{INT SAVE_Y; if (change_y) save_y = y, y = new_y; ... if (change_y) y = save_y;}
There is no mistake here because only Save_y is set to use him. Define all non-returned functions to volatile to avoid certain or not warnings.
-WParentheSes In some cases, if parentheses are ignored, the compiler will issue a warning.
-Wtemplate-debugging When using template in a C program, if debugging is not fully effective, the compiler will issue a warning. (Only for C ).
-Wall combines all of the above `-w 'options. Usually we recommend avoiding these warned usage, we believe that properly combined with macros can easily avoid these usage. The remaining `-w ... 'option is not included in` -wall', because we believe that these compiler warned program structures can be reasonably used in the "clean" program.
-Wtraditiona If some programs are different in traditional C and different ANSI C, the compiler issues a warning.
* The macro ginsence appears inside the string constant of the macro body. Traditional C will replace the macro-ginseng, and ANSI C will depend on part of the constant.
* A function is declared in block (Block) as an external, but then calls after the block is completed.
* The operating type of the Switch statement is long.
-Wshadow Once a part variable is blocked, the compiler issues a warning.
-Wid-Clash-Len once two determined identifiers have the same front LEN characters, the compiler will issue a warning. He can help you develop some programs that will be compiled on some outdated, compilers that harm the brain.
-Wpointer-Arith Any statement relies on the size of the function type (size) or the Void type size, the compiler issues a warning. GNU C defines these types to 1 in order to facilitate the calculation of the VOID * pointer and function pointer.
-Wcast-qual once a pointer enforces type conversion to remove type modifiers,, for example, if Const Char * is forced to convert to normal char *, warnings will appear.
-WCAST-Align For a pointer type forced conversion, the address alignment required to achieve the target is increased, and the compiler will issue a warning. For example, some machines can only access an integer on the 2 or 4-byte boundary, If the Char * is forced into an int * type on this model, the compiler will issue a warning.
-Wwrite-strings specifies that the type of string constants is const char [length], so copy this address to the Non-Const Char * pointer will generate a warning. These warnings can help you find an attempt to write a string often during compilation The code, but you must use const in the statement and prototypes very carefully, otherwise they can only bring trouble; so we don't let the `-wall 'provide these warnings.
-Wconversion If the type conversion caused by a function protocol is different, the compiler will issue a warning. Here, the compiler is warned. Here, the design of the fixed point and the floating point number, change the width or symbol of the fixed point number, unless they are default Declaken is the same.
-Waggregate-return If the return structure or a combined function is defined, the compiler will issue a warning. (From a language perspective you can return an array, but it will also cause a warning.)
-Wstrict-prototypes If the function's declaration or definition does not indicate the parameter type, the compiler issues a warning. (If the forward reference specifier indicates the parameter type, it is allowed to use the old-style function definition without the warning. )
-Wmissing-prototype If there is no pre-declaration function, the full-term function is defined. The compiler will issue a warning. Even if the function defines itself provides the original shape, this warning is generated. His purpose is to check the global function not declared in the header file. .
-Wmissing-declarations If there is no pre-declaration, a full-class function is defined. The compiler will issue a warning. Even if the function definitions provide the function of the function, this warning is generated. The purpose of this option is to check the global function that is not declared in the header file.
-Wredundant-decls If you define multiple declarations in the same visible domain, the compiler issues a warning, even if these repetitive declarations are valid and have no difference.
-Wnested-externs If a EXTERN statement appears inside the function, the compiler will issue a warning.
-Wenum-Clash issues a warning for the conversion between different enumeration types (only C only).
-Wlong-long If you use the long long type. This warning is a default. Use the `-wno-long-long 'option to prevent this warning.` -Wlong-long' and `-wno-long-long 'Under the `-pedantic'. -WoverLoaded-Virtual (only for C only) In inherited classes, the definition of the virtual function must match the type characteristics declared in the base class (TYPE SIGNATURE). When the inherited class declares a function, it may be an error attempt to define a virtual function, using this option to generate a warning: That is, when a function and the virtual function in the base class are the same name, the type feature is not in the group Any virtual function of the class, the compiler will issue a warning.
-Winline If a function cannot embed (inline), whether it is declared to inline or the -finline-functions option, the compiler will issue a warning.
-Werror approval warning is an error; any warning will give up compilation.
Debugging Option GNU CC has many special options, which can debug users' programs, or the GCC tap: -g Taking the operating system's local format (STABS, COFF, XCOFF, or DWARF). Generate debugging information. GDB can use these debugging information. On the system using the Stabs format, the `-g 'option starts additional debugging information that only GDB is used; this information makes the GDB debugging effect, but it is possible to cause other debugger crashes, Or refuse to read the program. If you determine if additional information is to be generated, use `-gstabs ',` -gstabs', `-gxcoff ',` -gxcoff ', `-gdwarf , or` -gdwarf' (see The following).
Unlike most C compilers, the GNU CC allows for use in the `-g 'and` -o' option. Optimized code occasionally manufactures some surprises: some declared variables do not exist at all; the control flow directly to It is expected that some statements are not executed because the calculation results are constant or have been determined; some statements are executed elsewhere because they have been moved outside.
However, it proves that the output of debug optimization is possible. It is reasonable to use an optimizer to use an optimizer that may contain errors.
If the GNU CC supports outputting multiple debugging information, the following options are very useful.
-ggdb outputs debugging information in local format (if supported), including GDB extensions as much as possible.
-gstabs outputs debugging information in Stabs format (if supported), does not include GDB extensions. This is the format used by DBX on most BSD systems.
-gstabs outputs debugging information in Stabs format (if supported), using only GNU debugger (GDB), using only GNU debugger (GDB), using these extensions, can cause other debuggers to crash or reject read programs.
-gcoff outputs debugging information in a COFF format (if supported). This is the format used in most System V systems in the SYSTEM V system in the SYSTEM V.
-gxcoff outputs debugging information in XCOFF format (if supported). This is the format used by the DBX debugger on the IBM RS / 6000 system.
-gxcoff outputs debugging information in XCOFF format (if supported), using only GNU debugger (GDB), using only GNU debugger (GDB), using these extensions, can cause other debuggers to crash or reject read programs.
-gdwarf is output debugging information in DWARF format (if supported). This is the format used by SDB on the SYSTEM V fourth edition system.
-gdwarf outputs debugging information in DWARF format (if supported), using only GNU debugger (GDB), using GNU extensions, using these extensions, can cause other debuggers to crash or reject read programs.
-glevel -ggdblevel -gstabslevel -gcofflevel -gxcofflevel
-gdwarflevel requests to generate debugging information, and use Level to point out how much information. The default Level value is 2. Level 1 outputs the least amount of information, only enough to be backed within the program that does not plan to debug. Include the description of the function and external variables, However, there is no local variable and line number information .level 3 contains more information, such as all macro definitions that appear in the program. When using the `-g3 'option, some debuggers support macro expansion.
-p produces additional code for outputting Profile information for analysis program PROF.
-pg generates additional code for outputting Profile information for analysis program Gprof.
-A produces additional code, which is used to output a Basic Block, which records the number of executions of each basic block, for program analysis such as TCOV. But note that this data format is not TCOV expectation. Final GNU Gprof will process these data. -AX generates additional code, used to read the pROFILE parameters of the base block from the 'bb.in' file, write the result of the Profile to 'bb.out' file. `bb.in 'contains one Function list. Once a function in the list is entered, the Profile action begins, after leaving the outermost function, the profile action ends. Exclude the function of the prerupted name to the PROFILE operation. If the function name is not The only thing, it can be written into `/path/filename.d:functionName 'to clarify.` Bb.out' will list some valid file names. These four function names have special meaning: `__bb_jumps__ 'leads to jumps (JUMP The frequency is written into `bb.out '.` __Bb_trace__' causes the basic block sequence to pass the pipe to `gzip ', output the` bbtrace.gz' file. `__Bb_hideCall__ 'causes the Call instruction from the Trace (TRACE).` __Bb_showret__' Resulting in the tracking including the return instruction.
-dletters When compiled, try the Temperature (DUMP). Used to debug the compiler. Most dumps of file names add words to the source file name (for example `foo.c.rtl 'or `foo.c.jump ').
-dm pretreatment time dumps all macro definitions, not output to files.
-DN dumps all macro names at the end of the pre-processing.
-dd pretreatment ends to dump all macro definitions while performing normal output.
-dy syntax analysis (PARSE) is used in standard error transfers debugging information.
The -DR RTL phase is dump to `file.rtl '.
-dx only generates RTL for functions instead of compiling. Typically and `r '.
-dj The first jump optimization and then dump to `file.jump '.
-DS CSE (including sometimes skip optimization behind CSE) to `file.cse '.
-dl loop after dump to `file.loop '.
-dt Second CSE treatment (including sometimes the jump optimization behind CSE) is dump to `file.cse2 '.
-DF process analysis (Flow Analysis) is dump to `file.flow '.
-DC instruction combination (INSTRUCTION combination) is dump to `file.combine '.
-DS The first instruction arrangement is dumpged to `File.Sched 'after the instruction schedule.
-dl partial register is allocated to `file.lreg '.
-DG Global register is sent to `file.greg 'after allocation.
-DR The second instruction arrangement is dumpged to `File.Sched2 'after an instruction schedule.
-dj The last jump optimization is dump to `file.jump2 '.
-dd delayed DELAYED BRANCH SCHEDULING and dumps to `file.dbr '.- DK register - Stack transformation After dump to` file.stack'.
-DA produces all of the above dices.
The -dm runs at the end of the standard error display memory usage statistics.
-DP In assembly output fusion indicates which mode is used (Pattern) and its alternative mode.
-fpRetend-float When compiled, assume that the target machine and the host use the same floating point format. It causes the output error floating point constant, but when running on the target machine, the real instruction sequence is likely to be hopeful with GNU CC. same.
-SAVE-TEMPS Save the intermediate files typically `` temporary ''; placed in the current directory and naming it according to the source file. Therefore, compiling `foo.c 'with` -c -save-temps' options` Foo.cpp 'and `foo.s' and` foo.o' files.
-Print-file-name = library display library file library full path name, use this library when connecting - there is nothing. According to this option, the GNU CC is neither compiled, nor connected, only the file name is displayed. .
-Print-libgcc-file-name is the same as `-Print-file-name = libgcc.a '.
-print-prog-name = program is similar to `-Print-file-name ', but finds program programs such as` CPP'.
Optimization Option These options control multiple optimization measures: -O -O1 optimization. For large functions, optimize compilation to occupy a slight time and considerable memory. Do not use the `-o 'option, the compiler's goals It is reduced to reduce the overhead of compilation, so that the compilation result can be debugged. Statement is independent: If you use a breakpoint abort program between the two statements, you can re-assign any variables, or refer to other statements in the function body. And accurately get the results you expect from the source program.
When you don't use the `-o 'option, you only declare that the REGISTER variable is allocated to use the register. The compile result is slightly inferior to the PCC that does not need to be` -o' option.
Using the `-o 'option, the compiler will try to reduce the size and execution time of the target code.
If you specify the `-o 'option,` -fthread-jumps' option will be opened. On the machine with DELAY SLOT, `-fdelayed-branch' option will be opened. Even if there is no frame Frame Pointer also supports debugging machines, `-fomit-frame-pointer 'option will be opened. Some machines may also open other options.
-O2 multi-optimized. In addition to the optimization options of space and speed exchange, almost all optimization work is performed. For example, the loop unrolling and function embedded. This option is incremented. Compile time, also improved the operation of generating code.
-O3 optimized more. In addition to opening -O2 all, it also opens the -finline-functions option.
-O0 is not optimized. If multiple -O options are specified, the last option is an option to take effect regardless of the tape.
Options such as `-fflag 'describe some of the machine-independent switches. Most switches have affirmative and negation two formats; the negative format of` -ffoo' switch option should be `-fno-foo '. The following list is only displayed A format --- that is not a default option. You can construct another format by removing or adding `NO- '.
-ffloat-Store Do not store floating point variables in registers. This prevents undesirable excessive precision on some machines, such as 68000 floating point registers (from 68881), more accuracy more than Double should have precision. For large Most programs, excessive high precision is only good. However, some programs are strictly dependent on the definition of the IEEE floating point number. You can use the `-ffloat-store 'option for such a program.-Fmemoize-lookups -fsave-memoize uses the exploration method (HEURISTIC) Faster compilation (only C only). By default, exploration method is not used. Since the exploration method is only valid for some input files, the compilation speed of other programs will become slower. The first compiler must be a member function ( Or references to member data) create a call. It must (1) to determine if this class implements the member function of that name; (2) Which member function is determined (involving which type of conversion that speculates need to do); 3) Check if the member function is visible to the caller. All of these constitute a slower compilation. General case, the second to the member function (or reference) of the member data, must be processed again after the same length. This means Code like this
COUT << "this" << p << "HAS" << n << "leggs./n";
It is necessary to do six traverses for the entire three steps. By using software cache, `` hit '' can significantly reduce this price. However, unfortunately, using this kind of cache must implement other mechanisms, bringing its own overhead. `-fmemoize-lookups' option Opens the software cache.
Because the function of the function is different, the function of the function on the member and member function may also be different. G may need to refresh the cache. Use the `-fmemoize-lookups' option, each compiled a function refreshes the cache. And` -fsave-memoized 'option also enables the same cache, but when the compiler finds the access rights generated by the final compiled function and the next function to be compiled, the compiler reserves the cache content. This is defined for a class Many member functions are very useful: In addition to some other classes of friends, each member function has exactly the same access as other member functions, so there is no need to refresh the cache.
-fno-default-inline defaults not to embed the member function because they are defined within the scope of the class (C only).
-fno-defer-Pop once the function returns, the parameter will pop up. For those machines that must pop up the parameters after the function, the compiler is generally causing the parameters that the function calls in the stack, and then pop up all once.
-Fforce-MEMs Before making mathematical operations, send memory operands to be used in the register. Convert memory access into potential public sub-expressions, it may produce a better target code. If they are not public sub-expression, instructions The combination should eliminate their respective registers. I will listen to different opinions.
-FFORCE-ADDR For mathematical operations, send the memory address constant to the usage to the register. It may have a better target code as `-fforce-mem '. I will listen to different opinions.
-Fomit-Frame-Pointer For a function that does not require a frame pointer, you do not save the frame pointer in the register. This can avoid saving, setting, and recovering the frame pointer instruction; at the same time, a number of functions provide an additional register. But In most machines will not be debugged. Some machines, such as VAX, this option is invalid, because the standard call sequence automatically processes the frame pointer, by pretending to exist without saving anything. Machine Description Macro Frame_Pointer_Required control the target machine Supply this Options.
-finline-functions integrates all simple functions into calls. The compiler explores what functions are simple enough, it is worthy of this integration. If all the calls are integrated, and the function declares that Static, then GCC has the right to not follow the assembly code output function.
-fcaller-saves allows value to allocate values in the register, but this scheme is usually subject to each function call, so the GCC generates additional code, saves and restores the register content before and after the function call. Only when generated code looks better This allocation is achieved. Some machines This option defaults to allow, usually these machines do not call the protection register instead of use.-Fkeep-inline-functions Even if all of the calls are integrated, and the function declares Static, Still output this function, a version that can be called when running.
-fno-function-cse Do not store the function address into the register; explicitly give the function address of the fixed function. This option generates a low efficiency destination code, but if you don't have this option, some unusual HACK, Change the output of the handup, may be confused due to optimization.
-fno-peephole prohibits any machine-related Peephole optimization.
-ffast-math options for speed optimization, allowing GCC to violate certain ANSI or IEEE rules / specifications. For example, it allows the compiler to assume that the parameters of the SQRT function are non-negative numbers. This option is not opened by any `-o 'option, because For mathematics functions implemented strictly on IEEE or ANSI rules / specifications, the program may generate an error result.
The following options control a specific optimization. `-O2 'option Open the following optimization items, in addition to` -funroll-loops' and `-funroll-all-loops' items.
The `-o 'option typically opens the` -fthread-jumps' and `-fdelayed-branch' optimization item, but the default optimization item on a particular machine is possible to change.
If you are very needed in special case, you can use the following options.
-FSTRENGTH-Reduce performs loop strength reduction (Loop Streg Reduction) and eliminates repeating variables.
-fthread-jumps perform an optimized location is that if there is another condition of the destination of a jump branch, and the condition is compared to the previous comparison statement, then perform optimization. Optimization is performed. According to the condition is True or False, front That branch redirects to the destination of the second branch or follows behind the second branch.
-Funroll-loops perform loop unrolling optimization. Only the number of cycles can be implemented at the time of compile or run.
-funroll-all-loops perform loop unrolling optimization. Implement all loops. It usually makes the program run slower.
-fcse-follow-jumps When there is a common subexpression eLimination, if there is no other path to reach a trunk, it swept this JUMP instruction. For example, if CSE encounters The IF statement of the ELSE clause, when the condition is tested as false, CSE follows the jump.
-fcse-skip-blocks is similar to `-fcse-follow-jumps' option, but CSE is behind the condition jump, the condition jumps and skips the statement block (block). If CSE encounters a simple IF statement, Without the ELSE clause, `-fcse-skip-blocks' option will cause CSE to follow the jump generated by the IF.
-Frerun-cse-after-loop After performing cyclic optimization, re-perform the public sub-expression embolization.
-felide-constructors If you look reasonably, you can omit the osmoder (only C ). According to this option, for the following code, GNU C is initialized from calling FOO, without the need to pass temporary variables: a foo (); a y = foo ();
If there is no such option, GNU C first initializes Y, then assigns Y; then the result of the FOO is assigned to the temporary variable; finally, replace the initial value of `Y 'with a temporary variable.
The ANSI C standard specifies the default behavior (`-fno-elide-constructors '). If the program is constructed,` -felide-constructors' option can make the program different performance, because some constructs may be ignored Call. -Fexpensive-Optimizations Execute some relative overhead of larger optimization.
-FDELAYED-BRANCH If the target supports this feature, it tries to rearrange instructions to use the Delayed Branch (Delayed Branch) instruction void.
-fschedule-insns If the target supports this feature, it tries to rearrange the instruction to eliminate the execution pause due to data unparalleled. This can help floating point operations or memory access slower machines, allowing other instructions Perform until the instruction or floating point operation is transferred.
-FSCHEDULE-INSNS2 is similar to `-fschedule-insns' option, but after register allocation is completed, an additional instruction scheduling process is required. This option is especially useful for machines with a relatively small number of registers. .
The target option (TARGET OPTION) By default, the GNU CC compiles the target code of this type. However, he can also install him into the intercourse compiler, compile the program for other models. In fact, for different targets, You can install the corresponding configuration of the GNU CC at the same time. Then specify the target machine with the `-b 'option.
By the way, the new version and the old version of the GNU CC can coexist. One version (which may be the latest) is the default version, but sometimes you want to use other versions.
-b Machine Parameters Machine points to the compiled target machine. This option is used to install the GNU CC of the cross-compiler. The value of the parameter Machine is the same as the machine type set when the GNU CC cross-compiler is configured. For example, if the cross-compiler configuration There is `configure i386v ', meaning compiling the System V target code on 80386, then you can run the cross-compiler through` -b i386v'.
If you do not specify a `-b 'option, you usually refer to compiling the native target code.
-V Version Parameter Version indicates which version of the GNU CC. This option is used to install multiple versions of GCC. For example, if Version is `2.0 ', it means running the GNU CC version 2.0. If you do not specify the` -v' option The default version depends on the installation of GNU CC, which is generally recommended to use universal versions.
Machine Dependent Option Each target model has its own special option, these options are booted by `-m 'switch, select different hardware models or configuration --- For example, 68010 is still 68020, there is no floating Click tooth processor. By specifying options, a version of the installation compiler can be compiled for all models or configurations.
In addition, some configuration of the compiler supports additional special options, usually in order to compatibility with this platform on the command line.
Below is a `-m 'option for 68000 series:
-m68000 -mc68000 outputs 68000 target code. If the compiler is configured based on 68000, this option is the default option.
-m68020 -mc68020 Output 68020 target code (not 68000). If the compiler is configured based on 68020, this option is the default option.
-m68881 outputs a target code containing 68881 floating point instructions. For most 68020-based systems that are default options, -NFP is specified unless the compiler is set.
-m68030 outputs 68030 target code. If the compiler is configured based on 68030, this option is the default option.
-m68040 outputs 68040 target code. If the compiler is configured based on 68040-based system configuration, this option is the default option.
-m68020-40 output 68040 target code, but does not use new instructions. The generated code can be operated more efficiently on 68020/68881 or on 68030 or 68040.
-MFPA outputs a target code containing the SUN FPA floating point instruction.
-msoft-float outputs a target code containing floating point libraries. WARNING: The library you need is not part of the GNU CC. Generally speaking, GCC uses the corresponding components of the local C compiler, but do not make cross-compilation Direct use. You must manage your own function library for cross-compilation.-Mshort believes that the int type is 16-bit wide, equivalent to Short Int.
-Mnobitfield does not use the bit-field instruction. `-m68000 'hidden the specified` -mnobitfield'.
-Mbitfield uses bitmap instructions. `-m68020 'hidden specified` -mbitfield'. If you use unmarkable GCC, this is the default option.
-mrtd uses another function call convention, the function accepts a fixed number of parameters, returns to the argument in the pop-up of the display with the RTD instruction. This method can save the caller, because he does not need to pop up the parameters. This call agreed is not compatible with UNIX normal calls. So if you need to call the library function compiled by the UNIX compiler, you cannot use this option.
In addition, all parameters variable functions must provide a function prototype (including Printf); otherwise the compiler generates an error call code.
Also, if you carrier too much parameters while calling a function, the compiler will generate a serious error code. (Under normal circumstances, excess parameters are ignored safely.)
68010 and 68020 processors support RTD instructions, but 68000 does not support.
Here is the `-m 'option for VAX definitions:
-munix prohibits outputting some jump instructions (AOBLEQ, etc.), and VAX's UNIX assembler cannot be processed across long-range (long Ranges).
-MGNU If you use the GNU assembler, then those jump instructions.
-mg output G-Format floating point number, replaces D-Format.
Here is the `-m 'option switch supported by SPARC:
-MFPU
-mhard-float outputs a target code containing floating point instructions. This is the default option.
-Mno-fpu
-msoft-float outputs a target code that contains floating point libraries. Warning: No GNU floating point library for SPARC. Generally speaking, the corresponding components of the local C compiler, but cannot be used directly for cross-compilation. You must Or arrange the library function for cross-compilation. -Msoft-float changes the call agreement in the output file; therefore only use this option to compile the entire program.
-Mno-Epilogue
-mepilogue When using the -mepilogue option, the compiler always places the exit code of the function in the tail of the function. Any exit statement in the function (such as the RETURN statement in C) will generate a jump instruction pointing function. Tail. When using the -mno-epilogue option, the compiler is as best in each function exit point to extract the exit code.
-MNO-V8
-MV8 -MspARClite These three options Select a different kind of SPARC system. By default (unless especially for Fujitsu SparClite configuration), GCC generates the SPARC V7 target code.
-MV8 generates a SPARC V8 target code. The only difference between his and V7 target code is that the compiler generates an integer multiplication and integer division instructions, and SPARC V8 supports the instruction, and the V7 system is not supported.
-msparclite generates a SparClite target code. Added an integer multiplication supported by SparClite, an Integer Divide STEP AND SCAN (FFS) instruction. The V7 system does not support these instructions.
-MCyPress
-MSUPERSPARC These two options are optimized for the processor. -mcypress option (default) enables the compiler to optimize the CYPRESS CY7C602 chip, the SparcStation / SparcServer 3xx series uses this chip. This option applies to Vintage SparcStation 1, 2, IPX and other models..
The -msupersPARC option uses this chip to the SUPERSPARC processor optimized code, SparcStation 10, 1000, and 2000 Series. At this point, the option enables a complete SPARC V8 instruction set.
Here is the `-m 'option for Convex definitions:
-mc1 outputs the target code of C1. When the compiler is configured to the C1 configuration. -mc2 outputs the target code of the C2. When the compiler is configured to the C2, this is the default option. -Margcount at each parameter list Place a parameter count (Argument Count Word). Some unmiglable CONVEX and VAX programs require this parameter number. (The debugger does not need him, unless the function has a large-length parameter list; this information is stored in the symbol table - Mnoargcount ignores the parameter count. If you use unmarkable GCC, this is the default option.
Below is the `-m 'option defined for the AMD AM29000:
-mdw The target code is considered to be set, that is, bytes, half-word operations are supported by hardware. This option is the default option. The target code generated by -MNODW considers DW not set. -MBW generated target code The system supports bytes and half-word write. This option is the default option. The target code generated by the -MNBW considers that the system does not support bytes and half-word write. This option hibuses the `-Mnodw 'option. -Msmall uses small Memory mode, small memory mode assumes that all functions of all functions are within a 256 kb segment, or the absolute address of all functions is less than 256K. This can be used instead of const, conste, calli instruction sequence with the CALL instruction. - MLARGE assumes This is the default option. -M29050 outputs the target code of the AM29050. -m29000 outputs the target code of the AM29000. This is the default option. The target code generated by the -Mkernel-registers is referenced by the GR64-GR95 register instead of the GR96-GR127 register. This option can Used to compile kernel code, the kernel requires a set of global registers, and the registers used by these global registers and user mode are completely unrelated. Note that when using this option, the register name in the `-f 'option must be Normal, User-Mode, Names .
-Muser-Registers uses a normal global register set GR96-GR127. This is the default option. -mStack-check Inserts a __msp_check call after each stack adjustment. This option is often used for kernel code.
Here is the `-m 'option defined for the Motorola 88K system:
The target code generated by the -M88000 can work normally on the M88100 and M88110. The target code generated by the -M88100 is best working on the M88100, but can also be run on the M88110. -m88110 The target code generated in M88110 is best working on M88110. However, it may not be possible to run on the M88100. -Midentify-revision contains an Ident command, record source file name, compiler name, and version, timeclars, and compile options used, -Mno-underscores in assembler The output, the symbol name does not add a next line. The default is to increase the underscore prefix in front of each name. -MnO-check-zero-division -mcheck-Zero-Division's 88K system has problems in addition to zero operation, Many machines cannot be sailed. Use these options to avoid the code containing (or can show) the additional code, which can check the division error, send exception signal. GCC All 88K configuration default uses `-mCheck-Zero- DiVision 'option. -mocs-debug-info -mno-oscision-debug-info contains (or ignored) additional debugging information (using the register in each stack structure), 88Open Object Compatibility Standard, `` ocs'' This information is explained. GDB does not need these extra information. DG / UX, SVR4, and Delta 88 SVR3.2 default configuration is to include debugging information, the default configuration of other 88k models is ignored. -Mocs- Frame-Position-Mno-OCS-Frame-position enforces (or not required) Store register values to the specified location in the stack frame structure (in OCS). DG / UX, Delta88 SVR3.2 and BCS default configuration use `-mocs-frame-position 'option; the default configuration of the other 88k models is` -Mno-OCS-frame-position'. -moptimize-arg-area -Mno-Optimize-arg-area Control How to store in a stack structure Function parameters. `-Moptimize-arg-area 'Save space, but it is possible to get down certain debuggers (not GDB).` -Mno-Optimize-arg-area' confirmed better than standard options. By default GCC is not optimized Parameter field.-Mshort-data- NUM generates smaller data by association with R0 Reference (Data Reference), you can use a single instruction to transfer a value (not a normal dual directive). Use the NUM control in the option to change which data reference. For example, if you specify` -mshort-data- 512 ', then affected data references are less than 512 bytes of data movement. The -Mshort-Data-Num option is invalid for NUM greater than 64K.
-Mserialize-Volatile
-Mno-serialize-volatile is generated, or does not generate code to ensure consistent with the result of volatile memory access. For conventional processor sub-models, the GNU CC always guarantees such consistency by default. How to implement the results consistently dependent on the processor model.
The M88100 processor does not rearrange the memory reference, so the access results are always consistent. If you are using the `-m88100 'option, the GNU CC does not produce special instructions consistent with the results.
The memory reference order of the M88110 processor does not always comply with the order of the instruction request. In particular, a read instruction may be executed before the previous storage instruction. Under the multiprocessor environment, the charter access to disturb the variable memory access Consistency. Therefore, when using `-m88000 'or` -m88110' option, the GNU CC produces special instructions when appropriate, forcing the execution order correct.
These additional code used to ensure consistency may affect the performance of the program. If you confirm that you can give up this guarantee, you can use the `-Mno-serialize-volatile 'option.
If you use the `-m88100 'option, but you need to match the results of the M88110 processor, you should add the` -mserialize-volatile' option.-Msvr4
-msvr3 opens (`-msvr4 ') or close (` -msvr3') and the compiler extension related to the SYSTEM V (SVR4). The effect is as follows: * Output which assembly syntax (you can use `-mversion-03.00 'Option Selection). * `-Msvr4' Make C Preprocessor to the` #pragma Weak 'instruction * `-msvr4' Make the GCC output additional declaration instruction for SVR4. In addition to SVR4 configuration,` - MSVR3 'is the default option for all M88K configurations.
-mtrap-large-shift -mhandle-large-shift contains some instructions for detecting a bit-shift greater than 31 bits; according to the corresponding option, sending such displacement (trap) or performing appropriate processing Code. By default, GCC does not do special processing on large displacement.
-Muse-Div-Instruction Earlier 88K models have no (DIV) division instructions, so the GCC avoids this instruction by default. And this option tells the GCC that this instruction is secure.
-mversion-03.00 There are two style SVR4 in DG / UX configuration. This option modifies -msvr4, select Hybrid-Coff or Real-Elf style. Other configurations ignore this option.
-mwarn-passed-structs If a function is transmitted as a parameter or result, the GCC issues a warning. With the development of C language, people have changed the convention of the conversion structure, which often leads to the problem. By default, GCC does not Will warn.
The following option is used for IBM RS6000:
-MFP-in-TOC
-MNO-FP-IN-TOC Control Whether floating point constants are placed in the content table (TOC), the content table stores all global variables and function addresses. By default, GCC places floating point constants here; if TOC overflows , `-Mno-fp-in-Toc 'option reduces the size of the TOC, so that overflow can be avoided.
The following `-m 'option is used for IBM RT PC:
-min-line-mul Use embedded code for integer multiplication. This is the default option. -mcall-lib-mul Use lmul $$ for integer multiplication. -mfull-fp-blocks generate full-size floating point data blocks, including IBM suggestions The minimum number of active spaces. This is the default option. -Mminimum-FP-Blocks Do not include additional activity space in the floating point data block. This produces less but slightly slow executable, because the activity space It must be dynamically allocated. -Mfp-arg-in-fpregs uses a call sequence that is not compatible with IBM calls. Note that if this option is specified, Varargs.h and stdargs.h will not be able to support floating Point unit.
-mfp-arg-in-GREGS uses normal call consequences to process floating point parameters. This is the default option.
-MHC-STRUCT-RETURN returns a structure greater than one word through memory instead of by register. Used to compatibility with the MetaWare Highc (HC) compiler. Using the `-fpcc-struct-return 'option is compatible with the Portable C compiler (PCC) .
-mnohc-struct-returnRn If you can return some of the structure greater than one word. This is the default option. If you plan to be compatible with the compiler provided by IBM, please use `-fpcc-struct-return 'or` -MHC-Struct -return 'option.
The following `-m 'option is used for the MIPS family:
-mcpu = CPU-TYPE generation command, assuming that the default machine type is CPU-Type. By default, CPU-Type is default, and GCC will select any model of the longest cycle time, so that The code runs in all MIPS processors. Other options for CPU-Type are R2000, R3000, R4000, and R6000. Although a CPU-Type is selected, the GCC will arrange the selected chip arrangement. Work, but if you do not specify ?? -Mips2 or -Mips3 option, the compiler does not output any code that does not meet the MIPS ISA (Instruction Set Architecture) level.-MIPS2 outputs MIPS ISA secondary instructions (possible extensions, such as square roots Directive). -Mcpu = R4000 or -mcpu = R6000 option must be coupled to -MIPS2.
-MIPS3 outputs MIPS ISA level 3 instruction (64-bit instruction). -mcpu = R4000 option must be used with -Mips2. (Translation: Doubt is -Mips3)
-mint64 -mlong64 -mlonglong128 These options are currently inadvertent.
-MMIPS-AS generates code for MIPS assembler, using MIPS-TFILE to add ordinary debugging information. For most platforms, this is the default option, except for OSF / 1 reference platform, it uses OSF / ROSE target format. If you open Any -gdb, -gstabs, or -gstabs option switch, the MIPS-TFile program is encapsulated in MIPS ECoff.
-mgas produces code for GNU assembler. This is the default option on the OSF / 1 reference platform, which uses OSF / ROSE target format.
-mrnames -mno-rnames-mRNames switch option tells the output code to use the MIPS software name description register, not the hardware name (that is, replacing $ 4 with A0). GNU assembler does not support the -mrnames option, while MIPS assembler runs MIPS C pre-regulator processing source file. -Mno-RNames is the default option.
-MgPopt-Mno-GPopt -MgPopt Switch option requires all data declarations to write all data declarations in front of the text section, allowing various MIPS assemblers to output single-word memory for short-type global or static data items. Access rather than double word memory access. This is the default function when the compilation optimization is turned on.
-mstats -Mno-stats After processing non-embedded functions (Non-inline function), the -mstats switch option allows the compiler to output a row to the standard error file (number of registers saved, stack size, etc. ).
-mmemcpy -mmemcpy switch option enables all block mobile operations to call the appropriate String function (Memcpy or BCopy) instead of generating embedded code.
-MMIPS-TFILE -MNO-MIPS-TFILE When the MIPS assembler generates a MIPS-TFile file (for help debugging), the -Mno-MIPS-TFile Switch Option blocks the compiler from using the MIPS-TFile postprocess target file. Do not run MIPS-TFile does not have local variables for the debugger. In addition, the Stage2 and STAGE3 target files will pass the temporary file name to the assembler, which means that the target file is not compared.
-msoft-float output contains floating point library calls. WARNING: The required library is not part of the GNU CC. Generally speaking, the corresponding components of the local C compiler, but cannot be used directly for cross-compilation, you must arrange it yourself. Provide cross-compilation applicable library functions.
-mhard-float output contains floating point instructions. If the compiler is not changed, this is the default option.
-mfp64 compiler The FR set (ON) of the status word is that there is a 32 64-bit floating point register, not a 32 32-bit floating point register. At the same time, the -mcpu = R4000 and -Mips3 switch must be opened.
-mfp32 is considered to have a 3232-bit floating point register. This is the default option.
-mabicalls
-Mno-Abicalls output (or no output) .Abicalls, .cpload, and .cprestore pseudo directive, some SYSTEM V.4 versions are used for location-independent code.-Mhalf-Pic-Mno-Half-Pic-Mhalf-Pic Switch The option requires the external referenced pointer to the data segment and loads in memory without placing it. This option does not work.
-G Num puts a small or static data smaller than or equal to NUM bytes, rather than a normal data segment or BSS segment. Such assembler can output a single word based on global pointer (GP or $ 28), single word Memory Access Directive instead of Dialotic Double Directive. By default, NUM is 8 when using the MIPS assembler, and the GNU assembler is 0. In addition, the -gnum option is also passed to the assembler and connector. All modules It must be compiled under the same-GNUM value.
-noCPP assembles user assembly files (with a `.s' suffix) tells the MIPS assembler not to run the pre-processor.
The following `-m 'option is used for Intel 80386 computers: -m486
-MNO-486 controls whether to generate an optimized code of 486.
-msoft-float output contains floating point library calls. WARNING: The required library is not part of the GNU CC. Generally speaking, the corresponding components of the local C compiler, but cannot be used directly for cross-compilation, you must arrange it yourself. Provide cross-compilation applicable library functions. Place the floating point return value on the machine of the 80387 register, even if you set the `-msoft-float 'option, some floating point opcode may be issued.
-MNO-FP-RET-IN-387 does not use the FPU register to return a function value. Usually the function call agreement puts the return value of Float and Double in the FPU register, even if there is no FPU. This kind of practice is that the operating system should simulate FPU.
The `-Mno-fp-Ret-IN-387 'option returns the floating point value through a normal CPU register.
The following `-m 'option is used for HPPA computers:
-MPA-RISC-1-0 generates the target code of the PA 1.0 processor. -MPA-RISC-1-1 generates the target code of the PA 1.1 processor.
-Mkernel generates a target code for the kernel. Special to avoid ADD instructions, it has a parameter that is a DP register; replacing the Add instruction with addil. This avoids a serious bug with the HP-UX connector.
-mshared-libs generates a target code that can connect to the HP-UX shared library. This option has not implemented all functions, and the default to the PA is turned off. Using this option can cause the compiler to generate an erroneous target code.
-Mno-Shared-Libs does not generate a target code to connect the HP-UX shared library. This is the default option for the PA target.
-mlong-calls The target code generated allows the function calls in the same source file, the distance from the calling point, and the adjusted function can be far more than 256K. Do not need to open this switch option, unless the connector gives it` `Branch out of Range Errors`` This error.
-mdisable-fpregs prevents the use of floating point registers in any case. Compile the kernel requires this option, the execution environment of the kernel switch floating point register is very slow. If this switch option is opened at the same time at the same time at the same time at the same time at the same time, the compile will fail.
-mdisable-indexing prevents the compiler from using indexing address mode. This is to avoid some very embarrassed issues when compiling the code generated by MIG.
-mtrailing-colon adds a colon (for ELF assembler) at the end of the label definition.
The following `-m 'option is used for Intel 80960 computers:
-mcpu-type default machine type is CPU-TYPE to cause the compiler to generate the corresponding instructions, address mode, and memory alignment. The default CPU-Type is KB; other options are Ka, MC, CA, CF, SA, and SB.
-MNUMERICS -MSOFT-FLOAT -MNUMERICS switch option indicates that the processor does not support floating point instructions. The -msoft-float switch option indicates that the machine should not be considered to support floating point operations.
-mleaf-procedures -mno-leaf-procedures attempts (or prevents) to change the leaf procedure to be called by the BAL instructions and Call instructions. For direct function call, if the BAL directive can be replaced by the assembler or connector This can produce more efficient code, but in other cases produce less code, such as through function pointer call, or use not supported such an optimized connector.-Mtail-call -mno-tail-call execution (Or do not perform) more attempts (unrelated part of the compiler), optimize the tail-recursive call to the branch. You may not need this, because the detection is invalid, there is no completed. Default switch Is -Mno-Tail-Call.
-MCOMPLEX-AddR -Mno-Complex-AddR believes that (or not believed) on the current I960 device, it is worth using composite address mode. Composite address mode may not be worth it to use, but must be used C Series. Currently in addition to the CB and CC processors, the -mcomplex-addr on other processors is the default option.
-mcode-align -Mno-code-align is aligned into the 8-byte boundary (or do not have to be) so that the read will only be opened for the C-Series by default.
-Mic-compat -Mic 2.0-compat -MiC3.0-Compat is compatible with IC960 V2.0 or V3.0.
-masm-compat -mintel-ASM is compatible with IC960 assembler.
-mstrict-align-mno-strict-align does not allow access to the boundaries of the boundary.
-mold-align is compatible with Intel's GCC release 1.3 (Based on GCC 1.37). This option is a bit problem because #pragma align 1 is always the same setting, and cannot be turned off.
The following `-m 'option is used for Dec Alpha devices:
-Mno-soft-float-msoft-float uses (or not using) hardware floating point instructions for floating point operations. When you open -Msoft-float, the floating point operation is performed using the function in `libgcc1.c '. Unless they are Emotional floating point operations replaced, or similar, they are compiled into calling simulation routines, these routines will make floating point operations. If you don't have a floating point ALPHA compiler, you must ensure that this library is established. In order to not call simulation routines. Note that Alpha without floating point operations also requires floating point registers.
-mfp-reg-mno-fp-regs generates the target code for use (or not) floating point register group. -MnO-fp-regs contains a -Msoft-float switch option. If you do not use floating point registers, floating point operations The number is transmitted through integer register, and the floating point calculation results are placed to $ 0 instead of $ F0. This is a non-standard call, so any function with floating point parameters or return value, if it is compiled by the -Mno-fp-regs switch The target code call, it must also be compiled with this option. The typical usage of this option is to establish the kernel. The kernel does not use any floating point registers, so there is no need to save and restore these registers.
The following additional options appear in the SYSTEM V fourth edition, used to compatible with other compilers in these systems:
-G In the SVR4 system, GCC is compatible with the `-g 'option (and then passed to the connector). But we recommend using the` -symbolic' or `-shared 'option, not the connection option on the GCC command line. .
-Qy Verify the version of the tool for the compiler, output to .IDENT assembly instruction.
-QN stops the output of the output end (default).
-Yp, DIRS For `-l 'specified library files, you only searchak DIRS. You can use colon to separate all directory items in DIRS.
-YM, DIR is looking for M4 preprocessors in the DIR directory. The assembler uses this option.
Code Generation Option (Code Generation Option) is independent of the options and platforms for controlling the interface conventions generated by the target code. Most options start with `-f '. These options have determined and negative two formats;` -ffoo' The negative format is `-fno-foo '. The description will only list one of the formats - non-default format. You can put another format by adding or removing the` no-'. -Fnonnull-objects assumes The object obtained by reference is not NULL (C ). Generally, GNU C is conservatively assumed by reference to the object obtained by reference. For example, the compiler will check A of the following code is not null:
Obj & a = g (); A.F (2);
Check that similar references require additional code, but for many programs are unnecessary. If your program does not require this check, you can ignore it with the `-fnonnull-objects' option.
When the -fpcc-struct-return function returns the Struct and UNION values, the same parameters as the local compiler are adopted. For smaller structures, this agreed efficiency is low, and many machines cannot be re-entered; its advantages are Allow GCC-compiled target code and target code compiled by PCC to each other.
-freg-struct-return is possible to return Struct and UNION function values through registers. For smaller structures, it is more efficient than -fpcc-struct-return. If neither -fpcc-struct-return, no Specifies -freg-struct-return, GNU CC defaults to use the target of the target. If there is no standard convention, the GNU CC uses -fpcc-struct-return.
-fshort-enums gives the Enum type only the number of bytes of the value domain range it declares. That is to say, the ENUM type is equal to the smallest integer type of size.
-fshort-double makes the size of the Double type and float.
-fshared-data requires data and non-Const variables to compile results, not private data. This difference is only meaningful above some operating systems, where shared data is shared between several processes of the same program, and Private data has a subscriber in each process.
-fno-Common Even if the global variables that are not initialized are also assigned to the BSS segment of the target file, not to establish them as a common block. This result is that if the same is declared in two different compilation results. Variables (not using extern), incorrectly generated when they connect them. The only case where this option is useful is that you want to confirm that the program can run on other systems, while other systems always do.
-fno-ident ignores the `#ident 'instruction.
-fno-gnu-linker does not output global initialization components (such as C constructor sub-recipes) to be used as the GNU connector (on the system of the GNU connector is a standard method). When you plan to use a non-GNU connector This option can be used, and the non-GNU connector also requires the Collect2 program to ensure that the system connector is placed in the constructor and the destructor. (GNU CC contains a Collect2 program.) For the collect2 The system, the compiler driver GCC is automatically configured to do this.
-finhibit-size-directive Do not output .Size assembly instruction, or other similar instructions, when a function is divided into two, two parts can cause problems in memory. When compiling `crtstuff.c ' This option should not be used in other cases.
-FverBose-ASM outputs some additional annotation information when assembled. This option is only used to read the assembly output (it may debug the compiler yourself).
-fvolatile makes the compiler that all memory accessible by pointer is volatile.
-fvolatile-Global makes the compiler that all external and global variables are variable memory.
-FPIC If this target machine is supported, the compiler generates a location-independent target code. Suitable for shared library.
-fpic If this target machine is supported, the compiler is independent of the output location. Suitable for dynamic linking, even if the branch requires a large-range transfer. -lfixed-reg The registers called REG Press fixed registers (Fixed " Register); The generated target code should not be referenced (except as a stack pointer, frame pointer, or other fixed role). Regu must be the name of the register. The register name depends on the machine, describes the REGISTER_NAMES macro of the macro file with the machine definition.
This option has no negation format because it lists the three selection.
-fcall-use-reg The registers called REG Press the register that can be assigned registers, cannot be used between function calls. You can use or use a variable to use, the survival period does not exceed a function. This compiled function does not need to save and restore the REG register If in the executable module, the register of this option is used as a fixed role will generate catastrophic results, such as stack pointers or frame pointers.
This option has no negation format because it lists the three selection.
-fcall-saved-reg The registers named registers are viewed by function. You can use or use it as a variable, which can even survive between functions. This compiled function saves and restores the REG register in use. If in the executable module, the register of this option is used as a fixed role will generate catastrophic results, such as stack pointers or frame pointers.
Another disaster is used to return a function value with the register description of this option.
This option has no negation format because it lists the three selection.
PragmasGNU C supports two `#pragma 'instructions to make the same header files two uses: Object class interface definition, object class complete content definition.
#pragma interface only in the header file of the definition object class, use this instruction to save most of the size of the target file that adopts this class. Generally, some information (backups of embedded member functions, Debugging information, realizing internal tables of virtual functions, etc.) The local subside must be saved in each target file that contains class definitions. Use this PRAGMA instruction to avoid such replication. When the compile is included in the compile, the header containing the `#pragma interface 'instruction When files, these auxiliary information will not be generated (unless the entered primary file is used to use the `#pragma impLementation 'instruction). Instead, the target file will contain references that can be parsed when it is connected.
#pragma importation #pragma implemementation "objects.h" (only C ) If a complete output is required (and globally visible) from the header file, you should use this pragma in the primary input file. Pragma interface 'instruction. In the Implementation file, the backup, debugging information of all embedded member functions will be generated, and the internal table of the virtual function is realized. If `#pragma importation' does not with the parameters, it refers to the same basis as the source file. The name of the name; for example, `allclass.cc ',` #pragma importation' is equal to `#pragma importation allClass.h '. If a importation file needs to introduce code from multiple header files, you should use this string parameter.
It is impossible to divide the contents of a header file to multiple implementation files.
File (File) file.c C Source File File.h C Header (Pre-Processing File) File.i Prereated C Source File File.c C Source File File.cc C Source File File.cxx C Source File File .m Objective-C source file file.s assembly language file file.o target file a.out connection output file TMPDIR / CC * Temporary file libDir / CPP pre-regulator libdir / cc1 c compiler libdir / cc1plus C compiler libdir / collect Some Machine Requires Connector Front End (Front end) program libdir / libgcc.a gcc subroutine (SUBROUTINE) library /lib/crt[01n].o boot routine (start-up) libdir / ccRT0 C Additional Startup Routine / Lib/Libc.A Standard C Library, see also the standard directory libdir / include #include file for the standard GCC directory libdir / g - Include #include file for the INTRO (3) / usr / include #include file G directory libdir is usually / usr / local / lib / machine / version. TMPDIR comes from environment variable Tmpdir (if present, default is / usr / tmp, otherwise / tmp).
See also (See Also) CPP (1), AS (1), LD (1), GDB (1), ADB (1), DBX (1), SDB (1). INFO` GCC ', `CPP' , `as',` ld ', and `gdb' entry. 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. Stallman and Roland H. Pesch; Using As: The GNU Assembler, Dean Elsner, Jay Fenlason & Friends; LD: The GNU Linker, Steve Chamberlain and Roland Pesch.
Guide for BUGS on reporting error Please check the GCC manual.
Copyright (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.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English.
Please check the Gun CC manual for GNU CC.
[Chinese version of the maintenance person] Xu Ming
-------------------------------------------------- ----------------------------- IndexName Total Overview (Synopsis) WARNING Description (Options) Overall Options ( OVERALL OPTION) PreproAGE Options Preprocessor Option (Assembler Option) Connector Options (Directory Option) Warning Option Debug Options (Debugging Option) Optimization Optimization Option Target Options (Machine Dependent Option) Code Generation Option Pragmas File (SEE ALSO) BUGS (COPYING) Author Edition maintenance person] [Chinese version latest update] "China Linux Forum MAN Handbook Translation Plan"
-------------------------------------------------- ----------------------------- This Document Was Created by Man2html, Using The Manual Pages.Time: GMT, January 14, 2004