📄 xscale_be-gcc.1
字号:
before attempting to modify the storage allocated. The current WorkingPaper requires that \f(CW\*(C`operator new\*(C'\fR never return a null pointer, sothis check is normally unnecessary..SpAn alternative to using this option is to specify that your\&\f(CW\*(C`operator new\*(C'\fR does not throw any exceptions; if you declare it\&\fB\f(BIthrow()\fB\fR, G++ will check the return value. See also \fBnew(nothrow)\fR..Ip "\fB\-fconserve-space\fR" 4.IX Item "-fconserve-space"Put uninitialized or runtime-initialized global variables into thecommon segment, as C does. This saves space in the executable at thecost of not diagnosing duplicate definitions. If you compile with thisflag and your program mysteriously crashes after \f(CW\*(C`main()\*(C'\fR hascompleted, you may have an object that is being destroyed twice becausetwo definitions were merged..SpThis option is no longer useful on most targets, now that support hasbeen added for putting variables into \s-1BSS\s0 without making them common..Ip "\fB\-fno-const-strings\fR" 4.IX Item "-fno-const-strings"Give string constants type \f(CW\*(C`char *\*(C'\fR instead of type \f(CW\*(C`constchar *\*(C'\fR. By default, G++ uses type \f(CW\*(C`const char *\*(C'\fR as required bythe standard. Even if you use \fB\-fno-const-strings\fR, you cannotactually modify the value of a string constant, unless you also use\&\fB\-fwritable-strings\fR..SpThis option might be removed in a future release of G++. For maximumportability, you should structure your code so that it works withstring constants that have type \f(CW\*(C`const char *\*(C'\fR..Ip "\fB\-fdollars-in-identifiers\fR" 4.IX Item "-fdollars-in-identifiers"Accept \fB$\fR in identifiers. You can also explicitly prohibit use of\&\fB$\fR with the option \fB\-fno-dollars-in-identifiers\fR. (\s-1GNU\s0 C allows\&\fB$\fR by default on most target systems, but there are a few exceptions.)Traditional C allowed the character \fB$\fR to form part ofidentifiers. However, \s-1ISO\s0 C and \*(C+ forbid \fB$\fR in identifiers..Ip "\fB\-fno-elide-constructors\fR" 4.IX Item "-fno-elide-constructors"The \*(C+ standard allows an implementation to omit creating a temporarywhich is only used to initialize another object of the same type.Specifying this option disables that optimization, and forces G++ tocall the copy constructor in all cases..Ip "\fB\-fno-enforce-eh-specs\fR" 4.IX Item "-fno-enforce-eh-specs"Don't check for violation of exception specifications at runtime. Thisoption violates the \*(C+ standard, but may be useful for reducing codesize in production builds, much like defining \fB\s-1NDEBUG\s0\fR. The compilerwill still optimize based on the exception specifications..Ip "\fB\-fexternal-templates\fR" 4.IX Item "-fexternal-templates"Cause \fB#pragma interface\fR and \fBimplementation\fR to apply totemplate instantiation; template instances are emitted or not accordingto the location of the template definition. .SpThis option is deprecated..Ip "\fB\-falt-external-templates\fR" 4.IX Item "-falt-external-templates"Similar to \fB\-fexternal-templates\fR, but template instances areemitted or not according to the place where they are first instantiated..SpThis option is deprecated..Ip "\fB\-ffor-scope\fR" 4.IX Item "-ffor-scope".PD 0.Ip "\fB\-fno-for-scope\fR" 4.IX Item "-fno-for-scope".PDIf \fB\-ffor-scope\fR is specified, the scope of variables declared ina \fIfor-init-statement\fR is limited to the \fBfor\fR loop itself,as specified by the \*(C+ standard.If \fB\-fno-for-scope\fR is specified, the scope of variables declared ina \fIfor-init-statement\fR extends to the end of the enclosing scope,as was the case in old versions of G++, and other (traditional)implementations of \*(C+..SpThe default if neither flag is given to follow the standard,but to allow and give a warning for old-style code that wouldotherwise be invalid, or have different behavior..Ip "\fB\-fno-gnu-keywords\fR" 4.IX Item "-fno-gnu-keywords"Do not recognize \f(CW\*(C`typeof\*(C'\fR as a keyword, so that code can use thisword as an identifier. You can use the keyword \f(CW\*(C`_\|_typeof_\|_\*(C'\fR instead.\&\fB\-ansi\fR implies \fB\-fno-gnu-keywords\fR..Ip "\fB\-fno-implicit-templates\fR" 4.IX Item "-fno-implicit-templates"Never emit code for non-inline templates which are instantiatedimplicitly (i.e. by use); only emit code for explicit instantiations..Ip "\fB\-fno-implicit-inline-templates\fR" 4.IX Item "-fno-implicit-inline-templates"Don't emit code for implicit instantiations of inline templates, either.The default is to handle inlines differently so that compiles with andwithout optimization will need the same set of explicit instantiations..Ip "\fB\-fno-implement-inlines\fR" 4.IX Item "-fno-implement-inlines"To save space, do not emit out-of-line copies of inline functionscontrolled by \fB#pragma implementation\fR. This will cause linkererrors if these functions are not inlined everywhere they are called..Ip "\fB\-fms-extensions\fR" 4.IX Item "-fms-extensions"Disable pedantic warnings about constructs used in \s-1MFC\s0, such as implicitint and getting a pointer to member function via non-standard syntax..Ip "\fB\-fno-nonansi-builtins\fR" 4.IX Item "-fno-nonansi-builtins"Disable built-in declarations of functions that are not mandated by\&\s-1ANSI/ISO\s0 C. These include \f(CW\*(C`ffs\*(C'\fR, \f(CW\*(C`alloca\*(C'\fR, \f(CW\*(C`_exit\*(C'\fR,\&\f(CW\*(C`index\*(C'\fR, \f(CW\*(C`bzero\*(C'\fR, \f(CW\*(C`conjf\*(C'\fR, and other related functions..Ip "\fB\-fno-operator-names\fR" 4.IX Item "-fno-operator-names"Do not treat the operator name keywords \f(CW\*(C`and\*(C'\fR, \f(CW\*(C`bitand\*(C'\fR,\&\f(CW\*(C`bitor\*(C'\fR, \f(CW\*(C`compl\*(C'\fR, \f(CW\*(C`not\*(C'\fR, \f(CW\*(C`or\*(C'\fR and \f(CW\*(C`xor\*(C'\fR assynonyms as keywords..Ip "\fB\-fno-optional-diags\fR" 4.IX Item "-fno-optional-diags"Disable diagnostics that the standard says a compiler does not need toissue. Currently, the only such diagnostic issued by G++ is the one fora name having multiple meanings within a class..Ip "\fB\-fpermissive\fR" 4.IX Item "-fpermissive"Downgrade messages about nonconformant code from errors to warnings. Bydefault, G++ effectively sets \fB\-pedantic-errors\fR without\&\fB\-pedantic\fR; this option reverses that. This behavior and thisoption are superseded by \fB\-pedantic\fR, which works as it does for \s-1GNU\s0 C..Ip "\fB\-frepo\fR" 4.IX Item "-frepo"Enable automatic template instantiation at link time. This option alsoimplies \fB\-fno-implicit-templates\fR. .Ip "\fB\-fno-rtti\fR" 4.IX Item "-fno-rtti"Disable generation of information about every class with virtualfunctions for use by the \*(C+ runtime type identification features(\fBdynamic_cast\fR and \fBtypeid\fR). If you don't use those partsof the language, you can save some space by using this flag. Note thatexception handling uses the same information, but it will generate it asneeded..Ip "\fB\-fstats\fR" 4.IX Item "-fstats"Emit statistics about front-end processing at the end of the compilation.This information is generally only useful to the G++ development team..Ip "\fB\-ftemplate-depth-\fR\fIn\fR" 4.IX Item "-ftemplate-depth-n"Set the maximum instantiation depth for template classes to \fIn\fR.A limit on the template instantiation depth is needed to detectendless recursions during template class instantiation. \s-1ANSI/ISO\s0 \*(C+conforming programs must not rely on a maximum depth greater than 17..Ip "\fB\-fuse-cxa-atexit\fR" 4.IX Item "-fuse-cxa-atexit"Register destructors for objects with static storage duration with the\&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR function rather than the \f(CW\*(C`atexit\*(C'\fR function.This option is required for fully standards-compliant handling of staticdestructors, but will only work if your C library supports\&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR..Ip "\fB\-fvtable-gc\fR" 4.IX Item "-fvtable-gc"Emit special relocations for vtables and virtual function referencesso that the linker can identify unused virtual functions and zero outvtable slots that refer to them. This is most useful with\&\fB\-ffunction-sections\fR and \fB\-Wl,\-\-gc-sections\fR, in order toalso discard the functions themselves..SpThis optimization requires \s-1GNU\s0 as and \s-1GNU\s0 ld. Not all systems supportthis option. \fB\-Wl,\-\-gc-sections\fR is ignored without \fB\-static\fR..Ip "\fB\-fno-weak\fR" 4.IX Item "-fno-weak"Do not use weak symbol support, even if it is provided by the linker.By default, G++ will use weak symbols if they are available. Thisoption exists only for testing, and should not be used by end-users;it will result in inferior code and has no benefits. This option maybe removed in a future release of G++..Ip "\fB\-nostdinc++\fR" 4.IX Item "-nostdinc++"Do not search for header files in the standard directories specific to\&\*(C+, but do still search the other standard directories. (This optionis used when building the \*(C+ library.).PPIn addition, these optimization, warning, and code generation optionshave meanings only for \*(C+ programs:.Ip "\fB\-fno-default-inline\fR" 4.IX Item "-fno-default-inline"Do not assume \fBinline\fR for functions defined inside a class scope. Note that thesefunctions will have linkage like inline functions; they just won't beinlined by default..Ip "\fB\-Wctor-dtor-privacy\fR (\*(C+ only)" 4.IX Item "-Wctor-dtor-privacy ( only)"Warn when a class seems unusable, because all the constructors ordestructors in a class are private and the class has no friends orpublic static member functions..Ip "\fB\-Wnon-virtual-dtor\fR (\*(C+ only)" 4.IX Item "-Wnon-virtual-dtor ( only)"Warn when a class declares a non-virtual destructor that should probablybe virtual, because it looks like the class will be used polymorphically..Ip "\fB\-Wreorder\fR (\*(C+ only)" 4.IX Item "-Wreorder ( only)"Warn when the order of member initializers given in the code does notmatch the order in which they must be executed. For instance:.Sp.Vb 5\& struct A {\& int i;\& int j;\& A(): j (0), i (1) { }\& };.VeHere the compiler will warn that the member initializers for \fBi\fRand \fBj\fR will be rearranged to match the declaration order of themembers..PPThe following \fB\-W...\fR options are not affected by \fB\-Wall\fR..Ip "\fB\-Weffc++\fR (\*(C+ only)" 4.IX Item "-Weffc++ ( only)"Warn about violations of the following style guidelines from Scott Meyers'\&\fIEffective \*(C+\fR book:.RS 4.Ip "\(bu" 4Item 11: Define a copy constructor and an assignment operator for classeswith dynamically allocated memory..Ip "\(bu" 4Item 12: Prefer initialization to assignment in constructors..Ip "\(bu" 4Item 14: Make destructors virtual in base classes..Ip "\(bu" 4Item 15: Have \f(CW\*(C`operator=\*(C'\fR return a reference to \f(CW\*(C`*this\*(C'\fR..Ip "\(bu" 4Item 23: Don't try to return a reference when you must return an object..RE.RS 4.Spand about violations of the following style guidelines from Scott Meyers'\&\fIMore Effective \*(C+\fR book:.RS 4.RE.Ip "\(bu" 4Item 6: Distinguish between prefix and postfix forms of increment anddecrement operators..Ip "\(bu" 4Item 7: Never overload \f(CW\*(C`&&\*(C'\fR, \f(CW\*(C`||\*(C'\fR, or \f(CW\*(C`,\*(C'\fR..RE.RS 4.SpIf you use this option, you should be aware that the standard libraryheaders do not obey all of these guidelines; you can use \fBgrep \-v\fRto filter out those warnings..RE.Ip "\fB\-Wno-deprecated\fR (\*(C+ only)" 4.IX Item "-Wno-deprecated ( only)"Do not warn about usage of deprecated features. .Ip "\fB\-Wno-non-template-friend\fR (\*(C+ only)" 4.IX Item "-Wno-non-template-friend ( only)"Disable warnings when non-templatized friend functions are declaredwithin a template. With the advent of explicit template specificationsupport in G++, if the name of the friend is an unqualified-id (i.e.,\&\fBfriend foo(int)\fR), the \*(C+ language specification demands that thefriend declare or define an ordinary, nontemplate function. (Section14.5.3). Before G++ implemented explicit specification, unqualified-idscould be interpreted as a particular specialization of a templatizedfunction. Because this non-conforming behavior is no longer the defaultbehavior for G++, \fB\-Wnon-template-friend\fR allows the compiler tocheck existing code for potential trouble spots, and is on by default.This new compiler behavior can be turned off with\&\fB\-Wno-non-template-friend\fR which keeps the conformant compiler codebut disables the helpful warning..Ip "\fB\-Wold-style-cast\fR (\*(C+ only)" 4.IX Item "-Wold-style-cast ( only)"Warn if an old-style (C-style) cast to a non-void type is used withina \*(C+ program. The new-style casts (\fBstatic_cast\fR,\&\fBreinterpret_cast\fR, and \fBconst_cast\fR) are less vulnerable tounintended effects, and much easier to grep for..Ip "\fB\-Woverloaded-virtual\fR (\*(C+ only)" 4.IX Item "-Woverloaded-virtual ( only)"Warn when a function declaration hides virtual functions from abase class. For example, in:.Sp.Vb 3\& struct A {\& virtual void f();\& };.Ve.Vb 3\& struct B: public A {\& void f(int);\& };.Vethe \f(CW\*(C`A\*(C'\fR class version of \f(CW\*(C`f\*(C'\fR is hidden in \f(CW\*(C`B\*(C'\fR, and codelike this:.Sp.Vb 2\& B* b;\& b->f();.Vewill fail to compile..Ip "\fB\-Wno-pmf-conversions\fR (\*(C+ only)" 4.IX Item "-Wno-pmf-conversions ( only)"Disable the diagnostic for converting a bound pointer to member functionto a plain pointer..Ip "\fB\-Wsign-promo\fR (\*(C+ only)" 4.IX Item "-Wsign-promo ( only)"Warn when overload resolution chooses a promotion from unsigned orenumeral type to a signed type over a conversion to an unsigned type ofthe same size. Previous versions of G++ would try to preserveunsignedness, but the standard mandates the current behavior..Ip "\fB\-Wsynth\fR (\*(C+ only)" 4.IX Item "-Wsynth ( only)"Warn when G++'s synthesis behavior does not match that of cfront. Forinstance:.Sp.Vb 4\& struct A {\& operator int (
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -