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

📄 arm-linux-cpp.1

📁 arm-linux.rar
💻 1
📖 第 1 页 / 共 3 页
字号:
replaced with zero..IP "\fB\-Wunused\-macros\fR" 4.IX Item "-Wunused-macros"Warn about macros defined in the main file that are unused.  A macrois \fIused\fR if it is expanded or tested for existence at least once.The preprocessor will also warn if the macro has not been used at thetime it is redefined or undefined..SpBuilt-in macros, macros defined on the command line, and macrosdefined in include files are not warned about..Sp\&\fBNote:\fR If a macro is actually used, but only used in skippedconditional blocks, then \s-1CPP\s0 will report it as unused.  To avoid thewarning in such a case, you might improve the scope of the macro'sdefinition by, for example, moving it into the first skipped block.Alternatively, you could provide a dummy use with something like:.Sp.Vb 2\&        #if defined the_macro_causing_the_warning\&        #endif.Ve.IP "\fB\-Wendif\-labels\fR" 4.IX Item "-Wendif-labels"Warn whenever an \fB#else\fR or an \fB#endif\fR are followed by text.This usually happens in code of the form.Sp.Vb 5\&        #if FOO\&        ...\&        #else FOO\&        ...\&        #endif FOO.Ve.SpThe second and third \f(CW\*(C`FOO\*(C'\fR should be in comments, but often are notin older programs.  This warning is on by default..IP "\fB\-Werror\fR" 4.IX Item "-Werror"Make all warnings into hard errors.  Source code which triggers warningswill be rejected..IP "\fB\-Wsystem\-headers\fR" 4.IX Item "-Wsystem-headers"Issue warnings for code in system headers.  These are normally unhelpfulin finding bugs in your own code, therefore suppressed.  If you areresponsible for the system library, you may want to see them..IP "\fB\-w\fR" 4.IX Item "-w"Suppress all warnings, including those which \s-1GNU\s0 \s-1CPP\s0 issues by default..IP "\fB\-pedantic\fR" 4.IX Item "-pedantic"Issue all the mandatory diagnostics listed in the C standard.  Some ofthem are left out by default, since they trigger frequently on harmlesscode..IP "\fB\-pedantic\-errors\fR" 4.IX Item "-pedantic-errors"Issue all the mandatory diagnostics, and make all mandatory diagnosticsinto errors.  This includes mandatory diagnostics that \s-1GCC\s0 issueswithout \fB\-pedantic\fR but treats as warnings..IP "\fB\-M\fR" 4.IX Item "-M"Instead of outputting the result of preprocessing, output a rulesuitable for \fBmake\fR describing the dependencies of the mainsource file.  The preprocessor outputs one \fBmake\fR rule containingthe object file name for that source file, a colon, and the names of allthe included files, including those coming from \fB\-include\fR or\&\fB\-imacros\fR command line options..SpUnless specified explicitly (with \fB\-MT\fR or \fB\-MQ\fR), theobject file name consists of the basename of the source file with anysuffix replaced with object file suffix.  If there are many includedfiles then the rule is split into several lines using \fB\e\fR\-newline.The rule has no commands..SpThis option does not suppress the preprocessor's debug output, such as\&\fB\-dM\fR.  To avoid mixing such debug output with the dependencyrules you should explicitly specify the dependency output file with\&\fB\-MF\fR, or use an environment variable like\&\fB\s-1DEPENDENCIES_OUTPUT\s0\fR.  Debug outputwill still be sent to the regular output stream as normal..SpPassing \fB\-M\fR to the driver implies \fB\-E\fR, and suppresseswarnings with an implicit \fB\-w\fR..IP "\fB\-MM\fR" 4.IX Item "-MM"Like \fB\-M\fR but do not mention header files that are found insystem header directories, nor header files that are included,directly or indirectly, from such a header..SpThis implies that the choice of angle brackets or double quotes in an\&\fB#include\fR directive does not in itself determine whether thatheader will appear in \fB\-MM\fR dependency output.  This is aslight change in semantics from \s-1GCC\s0 versions 3.0 and earlier..Sp@anchor{dashMF}.IP "\fB\-MF\fR \fIfile\fR" 4.IX Item "-MF file"When used with \fB\-M\fR or \fB\-MM\fR, specifies afile to write the dependencies to.  If no \fB\-MF\fR switch is giventhe preprocessor sends the rules to the same place it would have sentpreprocessed output..SpWhen used with the driver options \fB\-MD\fR or \fB\-MMD\fR,\&\fB\-MF\fR overrides the default dependency output file..IP "\fB\-MG\fR" 4.IX Item "-MG"In conjunction with an option such as \fB\-M\fR requestingdependency generation, \fB\-MG\fR assumes missing header files aregenerated files and adds them to the dependency list without raisingan error.  The dependency filename is taken directly from the\&\f(CW\*(C`#include\*(C'\fR directive without prepending any path.  \fB\-MG\fRalso suppresses preprocessed output, as a missing header file rendersthis useless..SpThis feature is used in automatic updating of makefiles..IP "\fB\-MP\fR" 4.IX Item "-MP"This option instructs \s-1CPP\s0 to add a phony target for each dependencyother than the main file, causing each to depend on nothing.  Thesedummy rules work around errors \fBmake\fR gives if you remove headerfiles without updating the \fIMakefile\fR to match..SpThis is typical output:.Sp.Vb 1\&        test.o: test.c test.h.Ve.Sp.Vb 1\&        test.h:.Ve.IP "\fB\-MT\fR \fItarget\fR" 4.IX Item "-MT target"Change the target of the rule emitted by dependency generation.  Bydefault \s-1CPP\s0 takes the name of the main input file, including any path,deletes any file suffix such as \fB.c\fR, and appends the platform'susual object suffix.  The result is the target..SpAn \fB\-MT\fR option will set the target to be exactly the string youspecify.  If you want multiple targets, you can specify them as a singleargument to \fB\-MT\fR, or use multiple \fB\-MT\fR options..SpFor example, \fB\-MT\ '$(objpfx)foo.o'\fR might give.Sp.Vb 1\&        $(objpfx)foo.o: foo.c.Ve.IP "\fB\-MQ\fR \fItarget\fR" 4.IX Item "-MQ target"Same as \fB\-MT\fR, but it quotes any characters which are special toMake.  \fB\-MQ\ '$(objpfx)foo.o'\fR gives.Sp.Vb 1\&        $$(objpfx)foo.o: foo.c.Ve.SpThe default target is automatically quoted, as if it were given with\&\fB\-MQ\fR..IP "\fB\-MD\fR" 4.IX Item "-MD"\&\fB\-MD\fR is equivalent to \fB\-M \-MF\fR \fIfile\fR, except that\&\fB\-E\fR is not implied.  The driver determines \fIfile\fR based onwhether an \fB\-o\fR option is given.  If it is, the driver uses itsargument but with a suffix of \fI.d\fR, otherwise it take thebasename of the input file and applies a \fI.d\fR suffix..SpIf \fB\-MD\fR is used in conjunction with \fB\-E\fR, any\&\fB\-o\fR switch is understood to specify the dependency output file(but \f(CW@pxref\fR{dashMF,,\-MF}), but if used without \fB\-E\fR, each \fB\-o\fRis understood to specify a target object file..SpSince \fB\-E\fR is not implied, \fB\-MD\fR can be used to generatea dependency output file as a side-effect of the compilation process..IP "\fB\-MMD\fR" 4.IX Item "-MMD"Like \fB\-MD\fR except mention only user header files, not system\&\-header files..IP "\fB\-x c\fR" 4.IX Item "-x c".PD 0.IP "\fB\-x c++\fR" 4.IX Item "-x c++".IP "\fB\-x objective-c\fR" 4.IX Item "-x objective-c".IP "\fB\-x assembler-with-cpp\fR" 4.IX Item "-x assembler-with-cpp".PDSpecify the source language: C, \*(C+, Objective\-C, or assembly.  This hasnothing to do with standards conformance or extensions; it merelyselects which base syntax to expect.  If you give none of these options,cpp will deduce the language from the extension of the source file:\&\fB.c\fR, \fB.cc\fR, \fB.m\fR, or \fB.S\fR.  Some other commonextensions for \*(C+ and assembly are also recognized.  If cpp does notrecognize the extension, it will treat the file as C; this is the mostgeneric mode..Sp\&\fBNote:\fR Previous versions of cpp accepted a \fB\-lang\fR optionwhich selected both the language and the standards conformance level.This option has been removed, because it conflicts with the \fB\-l\fRoption..IP "\fB\-std=\fR\fIstandard\fR" 4.IX Item "-std=standard".PD 0.IP "\fB\-ansi\fR" 4.IX Item "-ansi".PDSpecify the standard to which the code should conform.  Currently \s-1CPP\s0knows about C and \*(C+ standards; others may be added in the future..Sp\&\fIstandard\fRmay be one of:.RS 4.ie n .IP """iso9899:1990""" 4.el .IP "\f(CWiso9899:1990\fR" 4.IX Item "iso9899:1990".PD 0.ie n .IP """c89""" 4.el .IP "\f(CWc89\fR" 4.IX Item "c89".PDThe \s-1ISO\s0 C standard from 1990.  \fBc89\fR is the customary shorthand forthis version of the standard..SpThe \fB\-ansi\fR option is equivalent to \fB\-std=c89\fR..ie n .IP """iso9899:199409""" 4.el .IP "\f(CWiso9899:199409\fR" 4.IX Item "iso9899:199409"The 1990 C standard, as amended in 1994..ie n .IP """iso9899:1999""" 4.el .IP "\f(CWiso9899:1999\fR" 4.IX Item "iso9899:1999".PD 0.ie n .IP """c99""" 4.el .IP "\f(CWc99\fR" 4.IX Item "c99".ie n .IP """iso9899:199x""" 4.el .IP "\f(CWiso9899:199x\fR" 4.IX Item "iso9899:199x".ie n .IP """c9x""" 4.el .IP "\f(CWc9x\fR" 4.IX Item "c9x".PDThe revised \s-1ISO\s0 C standard, published in December 1999.  Beforepublication, this was known as C9X..ie n .IP """gnu89""" 4.el .IP "\f(CWgnu89\fR" 4.IX Item "gnu89"The 1990 C standard plus \s-1GNU\s0 extensions.  This is the default..ie n .IP """gnu99""" 4.el .IP "\f(CWgnu99\fR" 4.IX Item "gnu99".PD 0.ie n .IP """gnu9x""" 4.el .IP "\f(CWgnu9x\fR" 4.IX Item "gnu9x".PDThe 1999 C standard plus \s-1GNU\s0 extensions..ie n .IP """c++98""" 4.el .IP "\f(CWc++98\fR" 4.IX Item "c++98"The 1998 \s-1ISO\s0 \*(C+ standard plus amendments..ie n .IP """gnu++98""" 4.el .IP "\f(CWgnu++98\fR" 4.IX Item "gnu++98"The same as \fB\-std=c++98\fR plus \s-1GNU\s0 extensions.  This is thedefault for \*(C+ code..RE.RS 4.RE.IP "\fB\-I\-\fR" 4.IX Item "-I-"Split the include path.  Any directories specified with \fB\-I\fRoptions before \fB\-I\-\fR are searched only for headers requested with\&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for\&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR.  If additional directories arespecified with \fB\-I\fR options after the \fB\-I\-\fR, thosedirectories are searched for all \fB#include\fR directives..SpIn addition, \fB\-I\-\fR inhibits the use of the directory of the currentfile directory as the first search directory for \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR..IP "\fB\-nostdinc\fR" 4.IX Item "-nostdinc"Do not search the standard system directories for header files.Only the directories you have specified with \fB\-I\fR options(and the directory of the current file, if appropriate) are searched..IP "\fB\-nostdinc++\fR" 4.IX Item "-nostdinc++"Do not search for header files in the \*(C+\-specific standard directories,but do still search the other standard directories.  (This option isused when building the \*(C+ library.).IP "\fB\-include\fR \fIfile\fR" 4.IX Item "-include file"Process \fIfile\fR as if \f(CW\*(C`#include "file"\*(C'\fR appeared as the firstline of the primary source file.  However, the first directory searchedfor \fIfile\fR is the preprocessor's working directory \fIinstead of\fRthe directory containing the main source file.  If not found there, itis searched for in the remainder of the \f(CW\*(C`#include "..."\*(C'\fR searchchain as normal..SpIf multiple \fB\-include\fR options are given, the files are includedin the order they appear on the command line..IP "\fB\-imacros\fR \fIfile\fR" 4.IX Item "-imacros file"Exactly like \fB\-include\fR, except that any output produced byscanning \fIfile\fR is thrown away.  Macros it defines remain defined.This allows you to acquire all the macros from a header without alsoprocessing its declarations..Sp

⌨️ 快捷键说明

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