📄 00000007.htm
字号:
Warn whenever two distinct identifiers match in the <BR> first len characters. This may help you prepare a <BR> program that will compile with certain obsolete, <BR> brain-damaged compilers. <BR> <BR> -Wpointer-arith <BR> Warn about anything that depends on the "size of" a <BR> function type or of void. GNU C assigns these <BR> types a size of 1, for convenience in calculations <BR> with void * pointers and pointers to functions. <BR> <BR> -Wcast-qual <BR> Warn whenever a pointer is cast so as to remove a <BR> type qualifier from the target type. For example, <BR> warn if a const char * is cast to an ordinary char <BR> *. <BR> <BR> -Wcast-align <BR> Warn whenever a pointer is cast such that the re- <BR> quired alignment of the target is increased. For <BR> example, warn if a char * is cast to an int * on <BR> machines where integers can only be accessed at <BR> two- or four-byte boundaries. <BR> <BR> -Wwrite-strings <BR> Give string constants the type const char[length] <BR> so that copying the address of one into a non-const <BR> char * pointer will get a warning. These warnings <BR> will help you find at compile time code that can <BR> try to write into a string constant, but only if <BR> you have been very careful about using const in <BR> declarations and prototypes. Otherwise, it will <BR> just be a nuisance; this is why we did not make <BR> `-Wall' request these warnings. <BR> <BR> -Wconversion <BR> Warn if a prototype causes a type conversion that <BR> is different from what would happen to the same ar- <BR> gument in the absence of a prototype. This in- <BR> cludes conversions of fixed point to floating and <BR> vice versa, and conversions changing the width or <BR> signedness of a fixed point argument except when <BR> the same as the default promotion. <BR> <BR> -Waggregate-return <BR> Warn if any functions that return structures or <BR> unions are defined or called. (In languages where <BR> you can return an array, this also elicits a warn- <BR> ing.) <BR> <BR> -Wstrict-prototypes <BR> Warn if a function is declared or defined without <BR> specifying the argument types. (An old-style func- <BR> tion definition is permitted without a warning if <BR> preceded by a declaration which specifies the argu- <BR> ment types.) <BR> <BR> -Wmissing-prototypes <BR> Warn if a global function is defined without a pre- <BR> vious prototype declaration. This warning is is- <BR> sued even if the definition itself provides a pro- <BR> totype. The aim is to detect global functions that <BR> fail to be declared in header files. <BR> <BR> -Wmissing-declarations <BR> Warn if a global function is defined without a pre- <BR> vious declaration. Do so even if the definition <BR> itself provides a prototype. Use this option to <BR> detect global functions that are not declared in <BR> header files. <BR> <BR> -Wredundant-decls <BR> Warn if anything is declared more than once in the <BR> same scope, even in cases where multiple declara- <BR> tion is valid and changes nothing. <BR> <BR> -Wnested-externs <BR> Warn if an extern declaration is encountered within <BR> an function. <BR> <BR> -Wenum-clash <BR> Warn about conversion between different enumeration <BR> types (C++ only). <BR> <BR> -Woverloaded-virtual <BR> (C++ only.) In a derived class, the definitions of <BR> virtual functions must match the type signature of <BR> a virtual function declared in the base class. Use <BR> this option to request warnings when a derived <BR> class declares a function that may be an erroneous <BR> attempt to define a virtual function: that is, warn <BR> when a function with the same name as a virtual <BR> function in the base class, but with a type signa- <BR> ture that doesn't match any virtual functions from <BR> the base class. <BR> <BR> -Winline <BR> Warn if a function can not be inlined, and either <BR> it was declared as inline, or else the -fin- <BR> line-functions option was given. <BR> <BR> -Werror <BR> Treat warnings as errors; abort compilation after <BR> any warning. <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -