⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 g++.1

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 1
📖 第 1 页 / 共 2 页
字号:
\&\|'..TP.B \-gProduce debugging information in the operating system's native format(for DBX or SDB or DWARF).  GDB also can work with this debugginginformation.  On most systems that use DBX format, `\|\c.B \-g\c\&\|' enables useof extra debugging information that only GDB can use.Unlike most other C compilers, GNU CC allows you to use `\|\c.B \-g\c\&\|' with`\|\c.B \-O\c\&\|'.  The shortcuts taken by optimized code may occasionallyproduce surprising results: some variables you declared may not existat all; flow of control may briefly move where you did not expect it;some statements may not be executed because they compute constantresults or their values were already at hand; some statements mayexecute in different places because they were moved out of loops.Nevertheless it proves possible to debug optimized output.  This makesit reasonable to use the optimizer for programs that might have bugs..TP.BI "\-I" "dir"\c\&Append directory \c.I dir\c\& to the list of directories searched for include files..TP.BI "\-L" "dir"\c\&Add directory \c.I dir\c\& to the list of directories to be searchedfor `\|\c.B \-l\c\&\|'..TP.BI \-l library\c\&Use the library named \c.I library\c\& when linking.  (C++ programs often require `\|\c\-lg++\c\&\|' for successful linking.).TP.B \-nostdincDo not search the standard system directories for header files.  Onlythe directories you have specified with.B \-Ioptions (and the current directory, if appropriate) are searched..TP.B \-nostdinc++Do not search for header files in the standard directories specific toC++, but do still search the other standard directories.  (This optionis used when building libg++.).TP.B \-OOptimize.  Optimizing compilation takes somewhat more time, and a lotmore memory for a large function..TP.BI "\-o " file\c\&Place output in file \c.I file\c\&..TP.B \-SStop after the stage of compilation proper; do not assemble.  The outputis an assembler code file for each non-assembler inputfile specified..TP.B \-traditionalAttempt to support some aspects of traditional C compilers.Specifically, for both C and C++ programs:.TP\ \ \ \(buIn the preprocessor, comments convert to nothing at all, rather thanto a space.  This allows traditional token concatenation..TP\ \ \ \(buIn the preprocessor, macro arguments are recognized within stringconstants in a macro definition (and their values are stringified,though without additional quote marks, when they appear in such acontext).  The preprocessor always considers a string constant to endat a newline..TP\ \ \ \(buThe preprocessor does not predefine the macro \c.B __STDC__\c\& when you use`\|\c.B \-traditional\c\&\|', but still predefines\c.B __GNUC__\c\& (since the GNU extensions indicated by .B __GNUC__\c\& are not affected by`\|\c.B \-traditional\c\&\|').  If you need to write header files that workdifferently depending on whether `\|\c.B \-traditional\c\&\|' is in use, bytesting both of these predefined macros you can distinguish foursituations: GNU C, traditional GNU C, other ANSI C compilers, andother old C compilers..PP.TP\ \ \ \(buString ``constants'' are not necessarily constant; they are stored inwritable space, and identical looking constants are allocatedseparately.For C++ programs only (not C), `\|\c.B \-traditional\c\&\|' has one additional effect: assignment to .B thisis permitted.  This is the same as the effect of `\|\c.B \-fthis\-is\-variable\c\&\|'..TP.BI \-U macroUndefine macro \c.I macro\c\&..TP.B \-WallIssue warnings for conditions which pertain to usage that we recommendavoiding and that we believe is easy to avoid, even in conjunctionwith macros. .TP.B \-Wenum\-clashWarn when converting between different enumeration types..TP.B \-Woverloaded\-virtualIn a derived class, the definitions of virtual functions must matchthe type signature of a virtual function declared in the base class.Use this option to request warnings when a derived class declares afunction that may be an erroneous attempt to define a virtualfunction: that is, warn when a function with the same name as avirtual function in the base class, but with a type signature thatdoesn't match any virtual functions from the base class..TP.B \-Wtemplate\-debuggingWhen using templates in a C++ program, warn if debugging is not yetfully available..TP.B \-wInhibit all warning messages..TP.BI +e NControl how virtual function definitions are used, in a fashioncompatible with.B cfront1.x..PP.SH PRAGMASTwo `\|\c.B #pragma\c\&\|' directives are supported for GNU C++, to permit using the sameheader file for two purposes: as a definition of interfaces to a givenobject class, and as the full definition of the contents of that object class..TP.B #pragma interfaceUse this directive in header files that define object classes, to savespace in most of the object files that use those classes.  Normally,local copies of certain information (backup copies of inline memberfunctions, debugging information, and the internal tables thatimplement virtual functions) must be kept in each object file thatincludes class definitions.  You can use this pragma to avoid suchduplication.  When a header file containing `\|\c.B #pragma interface\c\&\|' is included in a compilation, this auxiliary informationwill not be generated (unless the main input source file itself uses`\|\c.B #pragma implementation\c\&\|').  Instead, the object files will contain references to beresolved at link time.  .tr !".TP.B #pragma implementation.TP.BI "#pragma implementation !" objects .h!Use this pragma in a main input file, when you want full output fromincluded header files to be generated (and made globally visible).The included header file, in turn, should use `\|\c.B #pragma interface\c\&\|'.  Backup copies of inline member functions, debugging information, andthe internal tables used to implement virtual functions are allgenerated in implementation files.If you use `\|\c.B #pragma implementation\c\&\|' with no argument, it applies to an include file with the samebasename as your source file; for example, in `\|\c.B allclass.cc\c\&\|', `\|\c.B #pragma implementation\c\&\|' by itself is equivalent to `\|\c.B #pragma implementation "allclass.h"\c\&\|'.  Use the string argument if you want a single implementationfile to include code from multiple header files.  There is no way to split up the contents of a single header file intomultiple implementation files. .SH FILES.ta \w'LIBDIR/g++\-include 'ufile.h	C header (preprocessor) file.brfile.i	preprocessed C source file.brfile.C	C++ source file.brfile.cc	C++ source file.brfile.cxx	C++ source file.brfile.s	assembly language file.brfile.o	object file.bra.out	link edited output.br\fITMPDIR\fR/cc\(**	temporary files.br\fILIBDIR\fR/cpp	preprocessor.br\fILIBDIR\fR/cc1plus	compiler.br\fILIBDIR\fR/collect	linker front end needed on some machines.br\fILIBDIR\fR/libgcc.a	GCC subroutine library.br/lib/crt[01n].o	start-up routine.br\fILIBDIR\fR/ccrt0	additional start-up routine for C++.br/lib/libc.a	standard C library, see.IR intro (3).br/usr/include	standard directory for .B #includefiles.br\fILIBDIR\fR/include	standard gcc directory for.B #includefiles.br\fILIBDIR\fR/g++\-include	additional g++ directory for.B #include.sp.I LIBDIRis usually.B /usr/local/lib/\c.IR machine / version ..br.I TMPDIRcomes from the environment variable .B TMPDIR(default.B /usr/tmpif available, else.B /tmp\c\&)..SH "SEE ALSO"gcc(1), cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1)..br.RB "`\|" gcc "\|', `\|" cpp \|', .RB `\| as \|', `\| ld \|',and .RB `\| gdb \|'entries in.B info\c\&..br.I Using and Porting GNU CC (for version 2.0)\c, Richard M. Stallman; .IThe C Preprocessor\c, Richard M. Stallman;.I Debugging with GDB: the GNU Source-Level Debugger\c, Richard M. Stallman and Roland H. Pesch;.IUsing as: the GNU Assembler\c, Dean Elsner, Jay Fenlason & friends;.Igld: the GNU linker\c, Steve Chamberlain and Roland Pesch..SH BUGSFor instructions on how to report bugs, see the GCC manual..SH COPYINGCopyright (c) 1991, 1992, 1993 Free Software Foundation, Inc..PPPermission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies..PPPermission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that theentire resulting derived work is distributed under the terms of apermission notice identical to this one..PPPermission is granted to copy and distribute translations of thismanual into another language, under the above conditions for modifiedversions, except that this permission notice may be included intranslations approved by the Free Software Foundation instead of inthe original English..SH AUTHORSSee the GNU CC Manual for the contributors to GNU CC.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -