gcc.texi
来自「GCC编译器源代码」· TEXI 代码 · 共 1,739 行 · 第 1/5 页
TEXI
1,739 行
\input texinfo @c -*-texinfo-*-@c %**start of header@setfilename gcc.info@c @setfilename usegcc.info@c @setfilename portgcc.info@c To produce the full manual, use the "gcc.info" setfilename, and@c make sure the following do NOT begin with '@c' (and the @clear lines DO)@set INTERNALS@set USING@c To produce a user-only manual, use the "usegcc.info" setfilename, and@c make sure the following does NOT begin with '@c':@c @clear INTERNALS@c To produce a porter-only manual, use the "portgcc.info" setfilename,@c and make sure the following does NOT begin with '@c':@c @clear USING@c (For FSF printing, turn on smallbook, comment out finalout below;@c that is all that is needed.)@c 6/27/96 FSF DO wants smallbook fmt for 1st bound edition.@c @smallbook@c i also commented out the finalout command, so if there *are* any@c overfulls, you'll (hopefully) see the rectangle in the right hand@c margin. -mew 15june93@c @finalout@c NOTE: checks/things to do:@c@c -have bob do a search in all seven files for "mew" (ideally --mew,@c but i may have forgotten the occasional "--"..). @c Just checked... all have `--'! Bob 22Jul96@c Use this to search: grep -n '\-\-mew' *.texi@c -item/itemx, text after all (sub/sub)section titles, etc..@c -consider putting the lists of options on pp 17--> etc in columns or@c some such.@c -spellcheck@c -continuity of phrasing; ie, bit-field vs bitfield in rtl.texi@c -overfulls. do a search for "mew" in the files, and you will see@c overfulls that i noted but could not deal with.@c -have to add text: beginning of chapter 8@c@c anything else? --mew 10feb93@ifset INTERNALS@ifset USING@settitle Using and Porting GNU CC@end ifset@end ifset@c seems reasonable to assume at least one of INTERNALS or USING is set...@ifclear INTERNALS@settitle Using GNU CC@end ifclear@ifclear USING@settitle Porting GNU CC@end ifclear@syncodeindex fn cp@syncodeindex vr cp@c %**end of header@c Use with @@smallbook.@c Cause even numbered pages to be printed on the left hand side of@c the page and odd numbered pages to be printed on the right hand@c side of the page. Using this, you can print on both sides of a@c sheet of paper and have the text on the same part of the sheet.@c The text on right hand pages is pushed towards the right hand@c margin and the text on left hand pages is pushed toward the left@c hand margin.@c (To provide the reverse effect, set bindingoffset to -0.75in.)@c @tex@c \global\bindingoffset=0.75in@c \global\normaloffset =0.75in@c @end tex@ifinfo@ifset INTERNALS@ifset USINGThis file documents the use and the internals of the GNU compiler.@end ifset@end ifset@ifclear USINGThis file documents the internals of the GNU compiler.@end ifclear@ifclear INTERNALSThis file documents the use of the GNU compiler.@end ifclearPublished by the Free Software Foundation59 Temple Place - Suite 330Boston, MA 02111-1307 USACopyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.Permission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies.@ignorePermission is granted to process this file through Tex and print theresults, provided the printed document carries copying permissionnotice identical to this one except for the removal of this paragraph(this paragraph not being relevant to the printed manual).@end ignorePermission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided also that thesections entitled ``GNU General Public License,'' ``Funding for FreeSoftware,'' and ``Protect Your Freedom---Fight `Look And Feel'@w{}'' areincluded exactly as in the original, and provided that the entireresulting derived work is distributed under the terms of a permissionnotice identical to this one.Permission is granted to copy and distribute translations of this manualinto another language, under the above conditions for modified versions,except that the sections entitled ``GNU General Public License,''``Funding for Free Software,'' and ``Protect Your Freedom---Fight `LookAnd Feel'@w{}'', and this permission notice, may be included intranslations approved by the Free Software Foundation instead of in theoriginal English.@end ifinfo@setchapternewpage odd@titlepage@ifset INTERNALS@ifset USING@center @titlefont{Using and Porting GNU CC}@end ifset@end ifset@ifclear INTERNALS@title Using GNU CC@end ifclear@ifclear USING@title Porting GNU CC@end ifclear@sp 2@center Richard M. Stallman@sp 3@center Last updated 7 January 1998@sp 1@c The version number appears three times more in this file.@center for version 2.8.0@page@vskip 0pt plus 1filllCopyright @copyright{} 1988, 89, 92, 93, 94, 95, 96 Free Software Foundation, Inc.@sp 2For GCC Version 2.8.0@*@sp 1Published by the Free Software Foundation @*59 Temple Place - Suite 330@*Boston, MA 02111-1307, USA@*Last printed November, 1995.@*Printed copies are available for $50 each.@*ISBN 1-882114-36-1@sp 1Permission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies.Permission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided also that thesections entitled ``GNU General Public License,'' ``Funding for FreeSoftware,'' and ``Protect Your Freedom---Fight `Look And Feel'@w{}'' areincluded exactly as in the original, and provided that the entireresulting derived work is distributed under the terms of a permissionnotice identical to this one.Permission is granted to copy and distribute translations of this manualinto another language, under the above conditions for modified versions,except that the sections entitled ``GNU General Public License,''``Funding for Free Software,'' and ``Protect Your Freedom---Fight `LookAnd Feel'@w{}'', and this permission notice, may be included intranslations approved by the Free Software Foundation instead of in theoriginal English.@end titlepage@page@ifinfo@node Top, G++ and GCC,, (DIR)@top Introduction@cindex introduction@ifset INTERNALS@ifset USINGThis manual documents how to run, install and port the GNUcompiler, as well as its new features and incompatibilities, and how toreport bugs. It corresponds to GNU CC version 2.8.0.@end ifset@end ifset@ifclear INTERNALSThis manual documents how to run and install the GNU compiler,as well as its new features and incompatibilities, and how to reportbugs. It corresponds to GNU CC version 2.8.0.@end ifclear@ifclear USINGThis manual documents how to port the GNU compiler,as well as its new features and incompatibilities, and how to reportbugs. It corresponds to GNU CC version 2.7.1.@end ifclear@end ifinfo@menu@ifset USING* G++ and GCC:: You can compile C or C++ programs.* Invoking GCC:: Command options supported by @samp{gcc}.* Installation:: How to configure, compile and install GNU CC.* C Extensions:: GNU extensions to the C language family.* C++ Extensions:: GNU extensions to the C++ language.* Gcov:: gcov: a GNU CC test coverage program.* Trouble:: If you have trouble installing GNU CC.* Bugs:: How, why and where to report bugs.* Service:: How to find suppliers of support for GNU CC.* Contributing:: How to contribute to testing and developing GNU CC.* VMS:: Using GNU CC on VMS.@end ifset@ifset INTERNALS* Portability:: Goals of GNU CC's portability features.* Interface:: Function-call interface of GNU CC output.* Passes:: Order of passes, what they do, and what each file is for.* RTL:: The intermediate representation that most passes work on.* Machine Desc:: How to write machine description instruction patterns.* Target Macros:: How to write the machine description C macros.* Config:: Writing the @file{xm-@var{machine}.h} file.* Fragments:: Writing the @file{t-@var{target}} and @file{x-@var{host}} files.@end ifset* Funding:: How to help assure funding for free software.* Look and Feel:: Protect your freedom---fight ``look and feel''.* Copying:: GNU General Public License says how you can copy and share GNU CC.* Contributors:: People who have contributed to GNU CC.* Index:: Index of concepts and symbol names.@end menu@ifset USING@node G++ and GCC@chapter Compile C, C++, or Objective C@cindex Objective CThe C, C++, and Objective C versions of the compiler are integrated; theGNU C compiler can compile programs written in C, C++, or Objective C.@cindex GCC``GCC'' is a common shorthand term for the GNU C compiler. This is boththe most general name for the compiler, and the name used when theemphasis is on compiling C programs.@cindex C++@cindex G++When referring to C++ compilation, it is usual to call the compiler``G++''. Since there is only one compiler, it is also accurate to callit ``GCC'' no matter what the language context; however, the term``G++'' is more useful when the emphasis is on compiling C++ programs.We use the name ``GNU CC'' to refer to the compilation system as awhole, and more specifically to the language-independent part of thecompiler. For example, we refer to the optimization options asaffecting the behavior of ``GNU CC'' or sometimes just ``the compiler''.Front ends for other languages, such as Ada 9X, Fortran, Modula-3, andPascal, are under development. These front-ends, like that for C++, arebuilt in subdirectories of GNU CC and link to it. The result is anintegrated compiler that can compile programs written in C, C++,Objective C, or any of the languages for which you have installed frontends.In this manual, we only discuss the options for the C, Objective-C, andC++ compilers and those of the GNU CC core. Consult the documentationof the other front ends for the options to use when compiling programswritten in other languages.@cindex compiler compared to C++ preprocessor@cindex intermediate C version, nonexistent@cindex C intermediate output, nonexistentG++ is a @emph{compiler}, not merely a preprocessor. G++ builds objectcode directly from your C++ program source. There is no intermediate Cversion of the program. (By contrast, for example, some otherimplementations use a program that generates a C program from your C++source.) Avoiding an intermediate C representation of the program meansthat you get better object code, and better debugging information. TheGNU debugger, GDB, works with this information in the object code togive you comprehensive C++ source-level editing capabilities(@pxref{C,,C and C++,gdb.info, Debugging with GDB}).@c FIXME! Someone who knows something about Objective C ought to put in@c a paragraph or two about it here, and move the index entry down when@c there is more to point to than the general mention in the 1st par.@include invoke.texi@include install.texi@include extend.texi@include gcov.texi@node Trouble@chapter Known Causes of Trouble with GNU CC@cindex bugs, known@cindex installation trouble@cindex known causes of troubleThis section describes known problems that affect users of GNU CC. Mostof these are not GNU CC bugs per se---if they were, we would fix them.But the result for a user may be like the result of a bug.Some of these problems are due to bugs in other software, some aremissing features that are too much work to add, and some are placeswhere people's opinions differ as to what is best.@menu* Actual Bugs:: Bugs we will fix later.* Installation Problems:: Problems that manifest when you install GNU CC.* Cross-Compiler Problems:: Common problems of cross compiling with GNU CC.* Interoperation:: Problems using GNU CC with other compilers, and with certain linkers, assemblers and debuggers.* External Bugs:: Problems compiling certain programs.* Incompatibilities:: GNU CC is incompatible with traditional C.* Fixed Headers:: GNU C uses corrected versions of system header files. This is necessary, but doesn't always work smoothly.* Standard Libraries:: GNU C uses the system C library, which might not be compliant with the ISO/ANSI C standard.* Disappointments:: Regrettable things we can't change, but not quite bugs.* C++ Misunderstandings:: Common misunderstandings with GNU C++.* Protoize Caveats:: Things to watch out for when using @code{protoize}.* Non-bugs:: Things we think are right, but some others disagree.* Warnings and Errors:: Which problems in your code get warnings, and which get errors.@end menu@node Actual Bugs@section Actual Bugs We Haven't Fixed Yet@itemize @bullet@item
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?