GCC-warnings含义

文章目录

GCC版本

gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

⭐-W

属性 作用
–all-warnings Same as -Wall. 和Wall一样。
–extra-warnings Same as -Wextra. 和Wextra一样。
-W This switch is deprecated; use -Wextra instead. Same as -Wextra. 此开关已被弃用;使用-Wextra代替。和Wextra一样。
-WNSObject-attribute Warn if the NSObject attribute is applied to a non-typedef. 如果NSObject属性应用于非类型定义,请发出警告。
-Wabi Warn about things that will change when compiling with an ABI-compliant compiler. 警告在使用兼容abi的编译器进行编译时可能会发生变化的事情。
-Wabi-tag Warn if a subobject has an abi_tag attribute that the complete object type does not have. 如果子对象具有完整对象类型没有的abi_tag属性,请发出警告。
-Wabi= Warn about things that change between the current -fabi-version and the specified version. 警告当前寓言版本和指定版本之间的变化。
-Wabsolute-value Warn on suspicious calls of standard functions computing absolute values. 警告对计算绝对值的标准函数的可疑调用。
-Waddress Warn about suspicious uses of memory addresses. 警告有关可疑使用内存地址的问题。
-Waddress-of-packed-member Warn when the address of packed member of struct or union is taken. 记录包装结构或工会成员的地址时发出警告。
-Waggregate-return Warn about returning structures, unions or arrays. 警告不要返回struct、union或array。
-Waggressive-loop-optimizations Warn if a loop with constant number of iterations triggers undefined behavior. 如果迭代次数不变的循环触发未定义行为,请发出警告。
-Waliasing Warn about possible aliasing of dummy arguments. 警告有关虚拟参数可能出现的混叠。
-Walign-commons Warn about alignment of COMMON blocks. 警告有关公共方块的对齐情况。
-Waligned-new=[none global 全局的。
-Wall Enable most warning messages. 启用大多数警告消息。
-Walloc-size-larger-than= Warn for calls to allocation functions that attempt to allocate objects larger than the specified number of bytes. 警告如何呼叫试图分配大于指定字节数的对象的分配函数。
-Walloc-zero Warn for calls to allocation functions that specify zero bytes. 警告对指定零字节的分配函数的调用。
-Walloca Warn on any use of alloca. 警告任何使用calaca。
-Walloca-larger-than= Warn on unbounded uses of alloca, and on bounded uses of alloca whose bound can be larger than bytes. 警告分配器的无界使用,以及有界的边界可以大于 字节的分配器的使用。
-Wampersand Warn about missing ampersand in continued character constants. 警告在连续字符常数中丢失超级符。
-Wanalyzer-double-fclose Warn about code paths in which a stdio FILE can be closed more than once. 警告有关可以多次关闭stdio文件的代码路径。
-Wanalyzer-double-free Warn about code paths in which a pointer can be freed more than once. 警告可以多次释放指针的代码路径。
-Wanalyzer-exposure-through-output-file Warn about code paths in which sensitive data is written to a file. 警告有关将敏感数据写入文件的代码路径。
-Wanalyzer-file-leak Warn about code paths in which a stdio FILE is not closed. 警告有关未关闭标准文件的代码路径。
-Wanalyzer-free-of-non-heap Warn about code paths in which a non-heap pointer is freed. 警告有关释放非堆指针的代码路径。
-Wanalyzer-malloc-leak Warn about code paths in which a heap-allocated pointer leaks. 警告其中有堆分配的指针泄漏的代码路径。
-Wanalyzer-mismatching-deallocation Warn about code paths in which the wrong deallocation function is called. 警告有关在其中调用了错误的释放函数的代码路径。
-Wanalyzer-null-argument Warn about code paths in which NULL is passed to a must-not-be-NULL function argument. 警告有关将NULL传递给必须非NULL函数参数的代码路径。
-Wanalyzer-null-dereference Warn about code paths in which a NULL pointer is dereferenced. 警告有关在其中取消引用NULL指针的代码路径。
-Wanalyzer-possible-null-argument Warn about code paths in which a possibly-NULL value is passed to a must-not-be-NULL function argument. 警告有关如何将可能为NULL的值传递给必须不为NULL的函数参数的代码路径。
-Wanalyzer-possible-null-dereference Warn about code paths in which a possibly-NULL pointer is dereferenced. 警告有关取消引用可能为空的指针的代码路径。
-Wanalyzer-shift-count-negative Warn about code paths in which a shift with negative count is attempted. 警告有关尝试使用负计数进行移位的代码路径。
-Wanalyzer-shift-count-overflow Warn about code paths in which a shift with count >= width of type is attempted. 警告尝试使用计数>=宽度的移位的代码路径。
-Wanalyzer-stale-setjmp-buffer Warn about code paths in which a longjmp rewinds to a jmp_buf saved in a stack frame that has returned. 警告有关longjmp回带到保存在已返回的堆栈帧中的jmp_buf的代码路径。
-Wanalyzer-tainted-array-index Warn about code paths in which an unsanitized value is used as an array index. 警告有关将未清理的值用作数组索引的代码路径。
-Wanalyzer-too-complex Warn if the code is too complicated for the analyzer to fully explore. 如果代码太复杂,分析器无法完全探索,请发出警告。
-Wanalyzer-unsafe-call-within-signal-handler Warn about code paths in which an async-signal-unsafe function is called from a signal handler. 警告有关从信号处理程序调用异步信号不安全函数的代码路径。
-Wanalyzer-use-after-free Warn about code paths in which a freed value is used. 警告有关使用释放值的代码路径。
-Wanalyzer-use-of-pointer-in-stale-stack-frame Warn about code paths in which a pointer to a stale stack frame is used. 警告如何使用指向陈旧堆栈帧的指针的代码路径。
-Wanalyzer-write-to-const Warn about code paths which attempt to write to a const object. 警告有关试图写入const对象的代码路径。
-Wanalyzer-write-to-string-literal Warn about code paths which attempt to write to a string literal. 警告有关试图写入字符串文字的代码路径。
-Warith-conversion Warn if conversion of the result of arithmetic might change the value even though converting the operands cannot. 警告,如果转换算术结果可能会更改值,即使转换操作数不能。
-Warray-bounds Warn if an array is accessed out of bounds. 如果数组,请发出警告。
-Warray-bounds=<0,2> Warn if an array is accessed out of bounds. 如果数组,请发出警告。
-Warray-parameter Warn about mismatched declarations of array parameters and unsafe accesses to them. Same as -Warray- parameter=. 警告有关数组参数的声明不匹配和对它们的不安全访问。与Warray参数=相同。
-Warray-parameter=<0,2> Warn about mismatched declarations of array parameters and unsafe accesses to them. 警告有关数组参数的声明不匹配和对它们的不安全访问。
-Warray-temporaries Warn about creation of array temporaries. 警告如何创建数组临时文件。
-Wassign-intercept Warn whenever an Objective-C assignment is being intercepted by the garbage collector. 当垃圾收集器拦截目标c分配时,请发出警告。
-Wattribute-alias Warn about type safety and similar errors and mismatches in declarations with alias attributes. Same as -Wattribute-alias=. 警告有关具有别名属性的声明中的类型安全性以及类似的错误和不匹配。与-W属性-别名=相同。
-Wattribute-alias=<0,2> Warn about type safety and similar errors and mismatches in declarations with alias attributes. 警告有关具有别名属性的声明中的类型安全性以及类似的错误和不匹配。
-Wattribute-warning Warn about uses of attribute((warning)) declarations. 警告不要使用attribute((warning))声明。
-Wattributes Warn about inappropriate attribute usage. 请警告有关不适当的属性使用。
-Wbad-function-cast Warn about casting functions to incompatible types. 警告不要将函数转换为不兼容的类型。
-Wbool-compare Warn about boolean expression compared with an integer value different from true/false. 警告关于布尔表达式与不同于true/false的整数值的比较。
-Wbool-operation Warn about certain operations on boolean expressions. 警告有关布尔表达式上的某些操作。
-Wbuiltin-declaration-mismatch Warn when a built-in function is declared with the wrong signature. 当内置函数声明了错误的签名时,会发出警告。
-Wbuiltin-macro-redefined Warn when a built-in preprocessor macro is undefined or redefined. 内置预处理器宏未定义或重新定义时发出警告。
-Wc+±compat Warn about C constructs that are not in the common subset of C and C++. 警告不在C和C++的共同子集中的C构造。
-Wc++0x-compat Same as -Wc++11-compat. 与Wc++11-compat相同。
-Wc++11-compat Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011. 警告C++结构的含义在ISO C++ 1998和ISO C++ 2011之间有所不同。
-Wc++14-compat Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014. 警告那些在ISO C++ 2011和ISO C++ 2014之间含义不同的C++结构。
-Wc++17-compat Warn about C++ constructs whose meaning differs between ISO C++ 2014 and ISO C++ 2017. 警告那些在ISO C++ 2014和ISO C++ 2017之间含义不同的C++结构。
-Wc++1z-compat Same as -Wc++17-compat. 与Wc++17-compat相同。
-Wc++20-compat Warn about C++ constructs whose meaning differs between ISO C++ 2017 and ISO C++ 2020. 警告C++结构在ISO C++ 2017和ISO C++ 2020之间有不同的含义。
-Wc++2a-compat Same as -Wc++20-compat. 与wc++20compat相同。
-Wc-binding-type Warn if the type of a variable might be not interoperable with C. 如果一个变量的类型可能不能与C互操作,请发出警告。
-Wc11-c2x-compat Warn about features not present in ISO C11, but present in ISO C2X. 警告在ISO C11中不存在,但在ISO C2X中存在的特性。
-Wc90-c99-compat Warn about features not present in ISO C90, but present in ISO C99. 警告在ISO C90中不存在,但在ISO C99中存在的功能。
-Wc99-c11-compat Warn about features not present in ISO C99, but present in ISO C11. 警告在ISO C99中不存在,但在ISO C11中存在的特性。
-Wcannot-profile Warn when profiling instrumentation was requested, but could not be applied to a certain function. 当请求分析仪器,但不能应用于某个功能时,请发出警告。
-Wcast-align Warn about pointer casts which increase alignment. 警告关于增加对齐程度的指针投射。
-Wcast-align=strict Warn about pointer casts which increase alignment. 警告关于增加对齐程度的指针投射。
-Wcast-function-type Warn about casts between incompatible function types. 警告注意不兼容的函数类型之间的类型转换。
-Wcast-qual Warn about casts which discard qualifiers. 警告有关丢弃限定符的强制转换。
-Wcast-result Warn about casts that will produce a null result. 警告有关将产生空结果的强制转换。
-Wcatch-value Warn about catch handlers of non-reference type. Same as -Wcatch-value=. 警告有关非引用类型的捕获处理程序。与Wcatch值=相同。
-Wcatch-value=<0,3> Warn about catch handlers of non-reference type. 警告有关非引用类型的捕获处理程序。
-Wchar-subscripts Warn about subscripts whose type is “char”. 警告有关其类型为“char”的下标。
-Wcharacter-truncation Warn about truncated character expressions. 警告不要截断字符表达式。
-Wchkp Removed in GCC 9. This switch has no effect. 已在GCC 9中删除。此开关没有任何作用。
-Wclass-conversion Warn when a conversion function will never be called due to the type it converts to. 当转换函数由于转换的类型而无法调用时发出警告。
-Wclass-memaccess Warn for unsafe raw memory writes to objects of class types. 警告对类类型的对象的不安全的原始内存写入。
-Wclobbered Warn about variables that might be changed by “longjmp” or “vfork”. 警告可能被“longjmp”或“vfork”更改的变量。
-Wcomma-subscript Warn about uses of a comma operator within a subscripting expression. 警告不要在下标表达式中使用逗号运算符。
-Wcomment Warn about possibly nested block comments, and C++ comments spanning more than one physical line. 警告可能嵌套的块注释和跨越多个物理行的C++注释。
-Wcomments Synonym for -Wcomment. Same as -Wcomment. -Watem的同义词。和评论一样。
-Wcompare-reals Warn about equality comparisons involving REAL or COMPLEX expressions. 警告注意涉及真实或复杂表达式的等式比较。
-Wconditionally-supported Warn for conditionally-supported constructs. 警告有条件支持的构造。
-Wconversion Warn for implicit type conversions that may change a value. 警告可能会更改值的隐式类型转换。
-Wconversion-extra Warn about most implicit conversions. 警告大多数隐式转换。
-Wconversion-null Warn for converting NULL from/to a non-pointer type. 警告如何将NULL从/转换为非指针类型。
-Wcoverage-mismatch Warn in case profiles in -fprofile-use do not match. 如果配置文件中的配置文件使用不匹配,请发出警告。
-Wcpp Warn when a #warning directive is encountered. 当遇到#警告指令时,系统会发出警告。
-Wctad-maybe-unsupported Warn when performing class template argument deduction on a type with no deduction guides. 在没有演绎指南的类型上执行类模板参数演绎时,请发出警告。
-Wctor-dtor-privacy Warn when all constructors and destructors are private. 当所有的构造函数和析构函数都是私有的时,请发出警告。
-Wdangling-else Warn about dangling else. 警告其他危险。
-Wdate-time Warn about TIME, DATE and TIMESTAMP usage. 警告有关时间、日期和时间戳的使用情况。
-Wdeclaration-after-statement Warn when a declaration is found after a statement. 在语句后找到声明时发出警告。
-Wdelete-incomplete Warn when deleting a pointer to incomplete type. 当删除指向不完整类型的指针时,会发出警告。
-Wdelete-non-virtual-dtor Warn about deleting polymorphic objects with non-virtual destructors. 警告不要删除具有非虚拟析构函数的多态对象。
-Wdeprecated Warn if a deprecated compiler feature, class, method, or field is used. 如果使用了已弃用的编译器特性、类、方法或字段,请发出警告。
-Wdeprecated-copy Mark implicitly-declared copy operations as deprecated if the class has a user-provided copy operation. 如果类具有用户提供的复制操作,则将隐式声明的复制操作标记为已弃用。
-Wdeprecated-copy-dtor Mark implicitly-declared copy operations as deprecated if the class has a user-provided copy operation or destructor. 如果类具有用户提供的复制操作或析构函数,则将隐式声明的复制操作标记为已弃用。
-Wdeprecated-declarations Warn about uses of attribute((deprecated)) declarations. 警告不要使用attribute((deprecated)) 声明。
-Wdeprecated-enum-enum-conversion Warn about deprecated arithmetic conversions on operands of enumeration types. 警告枚举类型操作数的算术转换。
-Wdeprecated-enum-float-conversion Warn about deprecated arithmetic conversions on operands where one is of enumeration type and the other is of a floating-point type. 警告禁止使用操作数的枚举类型和操作数的浮点类型的算术转换。
-Wdesignated-init Warn about positional initialization of structs requiring designated initializers. 警告有关需要指定初始化器的结构的位置初始化。
-Wdisabled-optimization Warn when an optimization pass is disabled. 当禁用优化通过时,会发出警告。
-Wdiscarded-array-qualifiers Warn if qualifiers on arrays which are pointer targets are discarded. 如果丢弃了作为指针目标数组上的限定符,请发出警告。
-Wdiscarded-qualifiers Warn if type qualifiers on pointers are discarded. 如果丢弃了指针上的类型限定符,请发出警告。
-Wdiv-by-zero Warn about compile-time integer division by zero. 警告关于编译时整数除以零。
-Wdo-subscript Warn about possibly incorrect subscripts in do loops. 警告在do循环中可能有不正确的下标。
-Wdouble-promotion Warn about implicit conversions from “float” to “double”. 警告关于从“浮动”到“双倍”的隐式转换。
-Wduplicate-decl-specifier Warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier. 当声明有重复的常量、易失性、限制或_原子说明符时,请发出警告。
-Wduplicated-branches Warn about duplicated branches in if-else statements. 警告在if-else语句中重复的分支。
-Wduplicated-cond Warn about duplicated conditions in an if-else-if chain. 警告如果链中的重复条件。
-Weffc++ Warn about violations of Effective C++ style rules. 警告是否违反了有效的C-++样式规则。
-Wempty-body Warn about an empty body in an if or else statement. 在if或else语句中警告一个空体。
-Wendif-labels Warn about stray tokens after #else and #endif. 警告在#else和#endif之后的丢失标记。
-Wenum-compare Warn about comparison of different enum types. 警告有关不同枚举类型的比较。
-Wenum-conversion Warn about implicit conversion of enum types. 请警告有关枚举类型的隐式转换。
-Werror-implicit-function-declaration This switch is deprecated; use -Werror=implicit-function-declaration instead. Same as -Werror=. 此开关已弃用;改为使用-Werror=隐式函数声明。与Werror=相同。
-Wexceptions Warn when an exception handler is shadowed by another handler. 当一个异常处理程序被另一个处理程序跟踪时,系统会发出警告。
-Wexpansion-to-defined Warn if “defined” is used outside #if. 如果“定义”在#外部使用,请警告。
-Wextra Print extra (possibly unwanted) warnings. 打印额外的(可能是不需要的)警告。
-Wextra-semi Warn about semicolon after in-class function definition. 类内函数定义后警告分号。
-Wfloat-conversion Warn for implicit type conversions that cause loss of floating point precision. 警告会导致浮点精度损失的隐式类型转换。
-Wfloat-equal Warn if testing floating point numbers for equality. 如果测试浮点数是否相同,请发出警告。
-Wformat Warn about printf/scanf/strftime/strfmon format string anomalies. Same as -Wformat=. 警告关于打印/扫描/扫描格式字符串异常。与Wformad=相同。
-Wformat-contains-nul Warn about format strings that contain NUL bytes. 警告有关包含NUL字节的格式字符串。
-Wformat-diag Warn about GCC format strings with strings unsuitable for diagnostics. 警告不要使用不适合诊断的字符串的GCC格式字符串。
-Wformat-extra-args Warn if passing too many arguments to a function for its format string. 如果向函数的格式字符串传递了太多的参数,请发出警告。
-Wformat-nonliteral Warn about format strings that are not literals. 警告非字面符的格式字符串。
-Wformat-overflow<0,2> Warn about function calls with format strings that write past the end of the destination region. Same as -Wformat-overflow=1. Same as -Wformat-overflow=. 警告使用超过目标区域结尾的格式字符串的函数调用。与-Wfromat-溢出=1相同。与-Wfromat-溢出=相同。
-Wformat-overflow=<0,2> Warn about function calls with format strings that write past the end of the destination region. 警告使用超过目标区域结尾的格式字符串的函数调用。
-Wformat-security Warn about possible security problems with format functions. 警告格式函数可能存在的安全问题。
-Wformat-signedness Warn about sign differences with format functions. 警告不要使用格式函数的符号差异。
-Wformat-truncation Warn about calls to snprintf and similar functions that truncate output. Same as -Wformat-truncation=1. Same as -Wformat-truncation=. 警告不要调用snprintf和截断输出的类似函数。与-Wfromat-截断=1相同。与-Wfromat-截断=相同。
-Wformat-truncation=<0,2> Warn about calls to snprintf and similar functions that truncate output. 警告不要调用snprintf和截断输出的类似函数。
-Wformat-y2k Warn about strftime formats yielding 2-digit years. 警告产生2位数年份的时间格式。
-Wformat-zero-length Warn about zero-length formats. 警告零长度格式。
-Wformat=<0,2> Warn about printf/scanf/strftime/strfmon format string anomalies. 警告关于打印/扫描/扫描格式字符串异常。
-Wframe-address Warn when builtin_frame_address or builtin_return_address is used unsafely. builtin_frame_address或builtin_return_address使用不安全时发出警告。
-Wframe-larger-than= Warn if a function’s stack frame requires in excess of . 如果函数的堆栈帧需要超过,请发出警告。
-Wfree-nonheap-object Warn when attempting to free a non-heap object. 当试图释放非堆对象时,应发出警告。
-Wfunction-elimination Warn about function call elimination. 警告有关函数调用消除。
-Whsa Does nothing. Preserved for backward compatibility. 什么也不做。保留了向后兼容性。
-Wif-not-aligned Warn when the field in a struct is not aligned. 在结构中的字段未对齐时发出警告。
-Wignored-attributes Warn whenever attributes are ignored. 每当忽略属性时,请发出警告。
-Wignored-qualifiers Warn whenever type qualifiers are ignored. 请在无论何时忽略类型限定符时发出警告。
-Wimplicit Warn about implicit declarations. 请警告有关隐式声明的信息。
-Wimplicit-fallthrough Same as -Wimplicit-fallthrough=3 (or, in negated form, -Wimplicit-fallthrough=0). 与=3相同(或者,否定形式,通过=0)。
-Wimplicit-fallthrough=<0,5> Warn when a switch case falls through. 当switch case下落时,请发出警告。
-Wimplicit-function-declaration Warn about implicit function declarations. 请警告有关隐式函数声明的信息。
-Wimplicit-int Warn when a declaration does not specify a type. 当声明未指定类型时,请发出警告。
-Wimplicit-interface Warn about calls with implicit interface. 警告不要使用隐式接口的调用。
-Wimplicit-procedure Warn about called procedures not explicitly declared. 警告有关未明确声明的已调用过程。
-Winaccessible-base Warn when a base is inaccessible in derived due to ambiguity. 当由于模糊性而无法访问一个碱基时,请发出警告。
-Wincompatible-pointer-types Warn when there is a conversion between pointers that have incompatible types. 当具有不兼容类型的指针之间发生转换时,请发出警告。
-Winherited-variadic-ctor Warn about C++11 inheriting constructors when the base has a variadic constructor. 当基有一个变量构造函数时,警告C++11继承构造函数。
-Winit-list-lifetime Warn about uses of std::initializer_list that can result in dangling pointers. 警告使用std::initializer_list可能导致悬空指针。
-Winit-self Warn about variables which are initialized to themselves. 警告那些已初始化为它们自己的变量。
-Winline Warn when an inlined function cannot be inlined. 当内联函数不能内联时,会发出警告。
-Wint-conversion Warn about incompatible integer to pointer and pointer to integer conversions. 警告与整数指针和整数转换的指针不兼容。
-Wint-in-bool-context Warn for suspicious integer expressions in boolean context. 请对布尔上下文中的可疑整数表达式发出警告。
-Wint-to-pointer-cast Warn when there is a cast to a pointer from an integer of a different size. 当有一个从不同大小的整数转换到指针时发出警告。
-Winteger-division Warn about constant integer divisions with truncated results. 警告有关具有截断结果的常量整数除法。
-Wintrinsic-shadow Warn if a user-procedure has the same name as an intrinsic. 如果用户过程与内在过程的名称相同,则会发出警告。
-Wintrinsics-std Warn on intrinsics not part of the selected standard. 警告内在因素不是所选标准的一部分。
-Winvalid-imported-macros Warn about macros that have conflicting header units definitions. 警告存在头单元定义冲突的宏。
-Winvalid-memory-model Warn when an atomic memory model parameter is known to be outside the valid range. 当已知原子内存模型参数超出有效范围时,请发出警告。
-Winvalid-offsetof Warn about invalid uses of the “offsetof” macro. 警告关于“抵消”宏的无效使用。
-Winvalid-pch Warn about PCH files that are found but not used. 警告已找到但未使用的PCH文件。
-Wjump-misses-init Warn when a jump misses a variable initialization. 当跳转缺少变量初始化时,会发出警告。
-Wlarger-than- Same as -Wlarger-than=. 和wmager一样——比=。
-Wlarger-than= Warn if an object’s size exceeds . 如果对象的大小超过了,请发出警告。
-Wline-truncation Warn about truncated source lines. 警告有关截断的源行。
-Wliteral-suffix Warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore. 当字符串或字符文字后跟一个不以下划线开头的ud-后缀时,会发出警告。
-Wlogical-not-parentheses Warn when logical not is used on the left hand side operand of a comparison. 在比较的左侧操作数上使用逻辑非时发出警告。
-Wlogical-op Warn when a logical operator is suspiciously always evaluating to true or false. 当逻辑运算符总是可疑地计算为真或假时,请发出警告。
-Wlong-long Do not warn about using “long long” when -pedantic. 不要警告使用“long long”时-迂腐。
-Wlto-type-mismatch During link time optimization warn about mismatched types of global declarations. 在链接时间优化期间,会对全局声明的不匹配类型发出警告。
-Wmain Warn about suspicious declarations of “main”. 警告有关可疑的“主要”声明。
-Wmaybe-uninitialized Warn about maybe uninitialized automatic variables. 警告有关可能未初始化的自动变量。
-Wmemset-elt-size Warn about suspicious calls to memset where the third argument contains the number of elements not multiplied by the element size. 警告关于对模集的可疑调用,其中第三个参数包含不乘以元素大小的元素数量。
-Wmemset-transposed-args Warn about suspicious calls to memset where the third argument is constant literal zero and the second is not. 警告对模集的可疑调用,其中第三个参数是常数零,第二个参数不是。
-Wmisleading-indentation Warn when the indentation of the code does not reflect the block structure. 当代码的缩进没有反映块结构时,请发出警告。
-Wmismatched-dealloc Warn for deallocation calls with arguments returned from mismatched allocation functions. 警告使用从不匹配的分配函数返回的参数的释放调用。
-Wmismatched-new-delete Warn for mismatches between calls to operator new or delete and the corresponding call to the allocation or deallocation function. 警告对操作符新或删除的调用与对分配或释放函数的相应调用之间的不匹配。
-Wmismatched-tags Warn when a class is redeclared or referenced using a mismatched class-key. 当使用不匹配的类键重新声明或引用类时,请发出警告。
-Wmissing-attributes Warn about declarations of entities that may be missing attributes that related entities have been declared with. 警告有关可能缺少已声明相关实体的属性的实体的声明。
-Wmissing-braces Warn about possibly missing braces around initializers. 警告在初始化器周围可能缺少大括号。
-Wmissing-declarations Warn about global functions without previous declarations. 警告关于没有以前声明的全局函数。
-Wmissing-field-initializers Warn about missing fields in struct initializers. 警告结构初始化器中缺少的字段。
-Wmissing-format-attribute Same as -Wsuggest-attribute=format. 与-Winde-属性=格式相同。
-Wmissing-include-dirs Warn about user-specified include directories that do not exist. 警告有关用户指定的包含不存在的目录。
-Wmissing-noreturn Same as -Wsuggest-attribute=noreturn. 与-Winde-属性=返回相同。
-Wmissing-parameter-type Warn about function parameters declared without a type specifier in K&R-style functions. 警告在K&r类型函数中声明的没有类型说明符的函数参数。
-Wmissing-profile Warn in case profiles in -fprofile-use do not exist. 如果配置文件中不存在,请警告。
-Wmissing-prototypes Warn about global functions without prototypes. 警告关于没有原型的全局函数。
-Wmultichar Warn about use of multi-character character constants. 警告不要使用多字符字符常量。
-Wmultiple-inheritance Warn on direct multiple inheritance. 警告直接多重继承。
-Wmultistatement-macros Warn about unsafe macros expanding to multiple statements used as a body of a clause such as if, else, while, switch, or for. 警告不安全宏扩展到用作子句主体的多个语句,例如if、else、while、switch或for。
-Wnamespaces Warn on namespace definition. 对命名空间定义发出警告。
-Wnarrowing Warn about narrowing conversions within { } that are ill-formed in C++11. 警告要缩小C++11中畸形的{}内的转换。
-Wnested-externs Warn about “extern” declarations not at file scope. 警告不要在文件范围内的“外部”声明。
-Wno-alloc-size-larger-than Disable Walloc-size-larger-than= warning. Equivalent to Walloc-size-larger-than=<SIZE_MAX> or larger. Same as -Walloc-size-larger-than=. 禁用Walloc大小-大于=的警告。相当于瓦洛尺寸-大于=<SIZE_MAX>或更大。与-walloc大小-大于-=相同。
-Wno-alloca-larger-than Disable Walloca-larger-than= warning. Equivalent to Walloca-larger-than=<SIZE_MAX> or larger. Same as -Walloca-larger-than=. 禁用大于=的=警告。相当于沃尔洛卡-大于=<SIZE_MAX>或更大。和沃洛卡一样——比=大。
-Wno-frame-larger-than Disable -Wframe-larger-than= warning. Equivalent to -Wframe-larger-than=<SIZE_MAX> or larger. Same as -Wframe-larger-than=. 禁用“大于=”警告。相当于-Wframe-大于-=<SIZE_MAX>或更大。和wframe一样——比=大。
-Wno-larger-than Disable -Wlarger-than= warning. Equivalent to -Wlarger-than=<SIZE_MAX> or larger. Same as -Wlarger- than=. 禁用-Wlamer-比=警告。相当于-大于=<SIZE_MAX>或更大。和=一样。
-Wno-stack-usage Disable Wstack-usage= warning. Equivalent to Wstack-usage=<SIZE_MAX> or larger. Same as -Wstack-usage=. 禁用Wstack-使用=警告。相当于堆栈使用=<SIZE_MAX>或更大。与wstack使用=相同。
-Wno-vla-larger-than Disable Wvla-larger-than= warning. Equivalent to Wvla-larger-than=<SIZE_MAX> or larger. Same as -Wvla- larger-than=. 禁用Wvla-大于=的警告。相当于Wvla-大于=<SIZE_MAX>或更大。和wvlalarger一样——比=。
-Wnoexcept Warn when a noexcept expression evaluates to false even though the expression can’t actually throw. 当一个例外表达式计算为false时发出警告,即使该表达式实际上不能抛出。
-Wnoexcept-type Warn if C++17 noexcept function type will change the mangled name of a symbol. 警告C++17除了函数类型将更改符号的混乱名称。
-Wnon-template-friend Warn when non-templatized friend functions are declared within a template. 在模板中声明非模板化的朋友函数时发出警告。
-Wnon-virtual-dtor Warn about non-virtual destructors. 警告有关非虚拟析构函数。
-Wnonnull Warn about NULL being passed to argument slots marked as requiring non-NULL. 警告不要将NULL传递给标记为需要非NULL的参数插槽。
-Wnonnull-compare Warn if comparing pointer parameter with nonnull attribute with NULL. 如果将指针参数与非空属性与NULL进行比较,请发出警告。
-Wnormalized Same as -Wnormalized=nfc (or, in negated form, -Wnormalized=none). 与-标准化=nfc相同(或者,以否定的形式,-标准化=none)。
-Wnormalized=[none id id
-Wnull-dereference Warn if dereferencing a NULL pointer may lead to erroneous or undefined behavior. 如果取消引用空指针可能导致错误或未定义的行为,请发出警告。
-Wobjc-root-class Warn if a class interface has no superclass. Root classes may use an attribute to suppress this warning. 如果一个类接口没有超类,请发出警告。根类可以使用一个属性来抑制此警告。
-Wodr Warn about some C++ One Definition Rule violations during link time optimization. 在链接时间优化期间,警告一些C++一定义规则的违反。
-Wold-style-cast Warn if a C-style cast is used in a program. 在程序中使用c样式转换时发出警告。
-Wold-style-declaration Warn for obsolescent usage in a declaration. 警告声明中的过时用法。
-Wold-style-definition Warn if an old-style parameter definition is used. 如果使用了旧式样式的参数定义,请发出警告。
-Wopenmp-simd Warn if a simd directive is overridden by the vectorizer cost model. 如果一个simd指令被向量转换器成本模型覆盖,请发出警告。
-Woverflow Warn about overflow in arithmetic expressions. 警告有关算术表达式中的溢出。
-Woverlength-strings Warn if a string is longer than the maximum portable length specified by the standard. 如果字符串超过该标准指定的最大可移动长度,请发出警告。
-Woverloaded-virtual Warn about overloaded virtual function names. 警告有关重载的虚拟函数名称。
-Woverride-init Warn about overriding initializers without side effects. 警告不要覆盖初始化器而没有副作用。
-Woverride-init-side-effects Warn about overriding initializers with side effects. 警告说要用副作用覆盖初始化器。
-Woverwrite-recursive Warn that -fno-automatic may break recursion. 警告说,自动识别可能会破坏递归。
-Wpacked Warn when the packed attribute has no effect on struct layout. 当打包的属性对结构布局没有影响时,请发出警告。
-Wpacked-bitfield-compat Warn about packed bit-fields whose offset changed in GCC 4.4. 警告在GCC 4.4中偏移量发生变化的填充位字段。
-Wpacked-not-aligned Warn when fields in a struct with the packed attribute are misaligned. 当具有填充属性的结构中的字段不对齐时,请发出警告。
-Wpadded Warn when padding is required to align structure members. 需要填充对齐结构构件时发出警告。
-Wparentheses Warn about possibly missing parentheses. 警告可能缺少圆括号。
-Wpedantic Issue warnings needed for strict compliance to the standard. 发出严格遵守该标准所需的警告。
-Wpessimizing-move Warn about calling std::move on a local object in a return statement preventing copy elision. 警告不要调用std::在返回语句中移动本地对象,防止复制省略。
-Wplacement-new Warn for placement new expressions with undefined behavior. Same as -Wplacement-new=. 警告如何放置具有未定义行为的新表达式。和新的=一样。
-Wplacement-new=<0,2> Warn for placement new expressions with undefined behavior. 警告如何放置具有未定义行为的新表达式。
-Wpmf-conversions Warn when converting the type of pointers to member functions. 在将指针的类型转换为成员函数时,会发出警告。
-Wpointer-arith Warn about function pointer arithmetic. 警告有关函数指针算法。
-Wpointer-compare Warn when a pointer is compared with a zero character constant. 当将指针与零字符常数进行比较时,会发出警告。
-Wpointer-sign Warn when a pointer differs in signedness in an assignment. 当赋值中的符号不同时发出警告。
-Wpointer-to-int-cast Warn when a pointer is cast to an integer of a different size. 将指针转换为不同大小的整数时发出警告。
-Wpragmas Warn about misuses of pragmas. 警告滥用实用。
-Wprio-ctor-dtor Warn if constructor or destructors with priorities from 0 to 100 are used. 如果使用优先级为0到100的构造函数或析构函数,请发出警告。
-Wproperty-assign-default Warn if a property for an Objective-C object has no assign semantics specified. 如果目标c对象的属性没有指定的分配语义,请发出警告。
-Wprotocol Warn if inherited methods are unimplemented. 如果继承的方法未实现,请发出警告。
-Wpsabi This option lacks documentation. 此选项缺少文档。
-Wrange-loop-construct Warn when a range-based for-loop is creating unnecessary copies. 当基于范围的为循环创建不必要的副本时,请发出警告。
-Wreal-q-constant Warn about real-literal-constants with ‘q’ exponent-letter. 用“q”指数字母警告实字面常数。
-Wrealloc-lhs Warn when a left-hand-side array variable is reallocated. 在重新分配左侧数组变量时,会发出警告。
-Wrealloc-lhs-all Warn when a left-hand-side variable is reallocated. 在重新分配左侧变量时发出警告。
-Wredundant-decls Warn about multiple declarations of the same object. 警告有关同一对象的多个声明。
-Wredundant-move Warn about redundant calls to std::move. 警告冗调呼叫移动。
-Wredundant-tags Warn when a class or enumerated type is referenced using a redundant class-key. 当使用冗余的类键引用类或枚举类型时,请发出警告。
-Wregister Warn about uses of register storage specifier. 警告如何使用寄存器存储说明符。
-Wreorder Warn when the compiler reorders code. 在编译器重新订购代码时发出警告。
-Wrestrict Warn when an argument passed to a restrict-qualified parameter aliases with another argument. 当参数传递给限制限定参数别名时发出警告。
-Wreturn-local-addr Warn about returning a pointer/reference to a local or temporary variable. 警告不要返回指向本地或临时变量的指针/引用。
-Wreturn-type Warn whenever a function’s return type defaults to “int” ©, or about inconsistent return types (C++). 当函数的返回类型默认为“int”©,或关于不一致的返回类型(C++)时,请发出警告。
-Wscalar-storage-order Warn on suspicious constructs involving reverse scalar storage order. 警告涉及反向标量存储顺序的可疑构造。
-Wselector Warn if a selector has multiple methods. 如果一个选择器有多个方法,请发出警告。
-Wsequence-point Warn about possible violations of sequence point rules. 警告可能违反序列点规则。
-Wshadow Warn when one variable shadows another. Same as -Wshadow=global. 当一个变量阴影另一个变量时发出警告。与Whood=全局相同。
-Wshadow-compatible-local Same as -Wshadow=compatible-local. 与-Wshawde=兼容-本地相同。
-Wshadow-ivar Warn if a local declaration hides an instance variable. 如果一个本地声明隐藏了一个实例变量,请发出警告。
-Wshadow-local Same as -Wshadow=local. 与Whood=本地相同。
-Wshadow=compatible-local Warn when one local variable shadows another local variable or parameter of compatible type. 当一个局部变量阴影另一个兼容类型的局部变量或参数时发出警告。
-Wshadow=global Warn when one variable shadows another (globally). Same as -Wshadow. 当一个变量阴影另一个变量(全局)时发出警告。与-Wshadle相同。
-Wshadow=local Warn when one local variable shadows another local variable or parameter. 当一个局部变量阴影另一个局部变量或参数时发出警告。
-Wshift-count-negative Warn if shift count is negative. 如果班次计数为负数,请发出警告。
-Wshift-count-overflow Warn if shift count >= width of type. 如果移位计数>=宽度类型的警告。
-Wshift-negative-value Warn if left shifting a negative value. 如果向左移动了一个负值,请发出警告。
-Wshift-overflow Warn if left shift of a signed value overflows. Same as -Wshift-overflow=. 如果有符号值的左移位溢出,请发出警告。与wshift溢出=相同。
-Wshift-overflow=<0,2> Warn if left shift of a signed value overflows. 如果有符号值的左移位溢出,请发出警告。
-Wsign-compare Warn about signed-unsigned comparisons. 警告无符号-无符号比较。
-Wsign-conversion Warn for implicit type conversions between signed and unsigned integers. 警告有符号整数和无符号整数之间的隐式类型转换。
-Wsign-promo Warn when overload promotes from unsigned to signed. 当过载从未签名升级到已签名时,请发出警告。
-Wsized-deallocation Warn about missing sized deallocation functions. 警告关于缺少大小的释放功能。
-Wsizeof-array-argument Warn when sizeof is applied on a parameter declared as an array. 当将大小应用于声明为数组的参数时,会发出警告。
-Wsizeof-array-div Warn about divisions of two sizeof operators when the first one is applied to an array and the divisor does not equal the size of the array element. 当第一个算子应用于数组且除数不等于数组元素的大小时,警告两个大小算子的划分。
-Wsizeof-pointer-div Warn about suspicious divisions of two sizeof expressions that don’t work correctly with pointers. 警告两个无法正确使用指针的大小表达式的可疑划分。
-Wsizeof-pointer-memaccess Warn about suspicious length parameters to certain string functions if the argument uses sizeof. 如果参数使用sizeof,请警告某些字符串函数的可疑长度参数。
-Wstack-protector Warn when not issuing stack smashing protection for some reason. 由于某种原因不发出堆栈粉碎保护时,应发出警告。
-Wstack-usage= Warn if stack usage might exceed . 如果堆栈使用量可能超过 ,请发出警告。
-Wstrict-aliasing Warn about code which might break strict aliasing rules. 警告可能违反严格混叠规则的代码。
-Wstrict-aliasing=<0,3> Warn about code which might break strict aliasing rules. 警告可能违反严格混叠规则的代码。
-Wstrict-null-sentinel Warn about uncasted NULL used as sentinel. 警告未空空用作哨兵。
-Wstrict-overflow Warn about optimizations that assume that signed overflow is undefined. 警告有关假定已签名溢出未定义的优化。
-Wstrict-overflow=<0,5> Warn about optimizations that assume that signed overflow is undefined. 警告有关假定已签名溢出未定义的优化。
-Wstrict-prototypes Warn about unprototyped function declarations. 警告关于非原型的函数声明。
-Wstrict-selector-match Warn if type signatures of candidate methods do not match exactly. 如果候选方法的类型签名不完全匹配,请发出警告。
-Wstring-compare Warn about calls to strcmp and strncmp used in equality expressions that are necessarily true or false due to the length of one and size of the other argument. 警告对等式表达式中使用的strcmp和strncmp的调用,由于一个参数的长度和另一个参数的大小,必然是正确或假的。
-Wstringop-overflow Warn about buffer overflow in string manipulation functions like memcpy and strcpy. Same as -Wstringop- overflow=. 警告像memcpy和strcpy等字符串操作功能中的缓冲区溢出。与wstrinop溢出=相同。
-Wstringop-overflow=<0,4> Under the control of Object Size type, warn about buffer overflow in string manipulation functions like memcpy and strcpy. 在“对象大小”类型的控制下,警告诸如memcpy和strcpy等字符串操作函数中的缓冲区溢出。
-Wstringop-overread Warn about reading past the end of a source array in string manipulation functions like memchr and memcpy. 警告不要在memchr和memcpy等字符串操作函数中读取源数组的末端。
-Wstringop-truncation Warn about truncation in string manipulation functions like strncat and strncpy. 警告关于在字符串操作功能如strncat和strncpy中的截断。
-Wsubobject-linkage Warn if a class type has a base or a field whose type uses the anonymous namespace or depends on a type with no linkage. 如果类类型的基域或字段的类型使用匿名名称空间或依赖于没有链接的类型,则应发出警告。
-Wsuggest-attribute=cold Warn about functions which might be candidates for attribute((cold)). 警告可能是attribute((cold))候选函数。
-Wsuggest-attribute=const Warn about functions which might be candidates for attribute((const)). 警告可能是attribute((const))的候选函数。
-Wsuggest-attribute=format Warn about functions which might be candidates for format attributes. 警告那些可能是格式属性的候选函数。
-Wsuggest-attribute=malloc Warn about functions which might be candidates for attribute((malloc)). 警告可能是attribute((malloc))的候选函数)。
-Wsuggest-attribute=noreturn Warn about functions which might be candidates for attribute((noreturn)). 警告可能是attribute((noreturn))的候选函数。
-Wsuggest-attribute=pure Warn about functions which might be candidates for attribute((pure)). 警告可能是attribute((pure))的候选函数。
-Wsuggest-final-methods Warn about C++ virtual methods where adding final keyword would improve code quality. 警告C++虚拟方法,其中添加最终关键字将提高代码质量。
-Wsuggest-final-types Warn about C++ polymorphic types where adding final keyword would improve code quality. 警告C++多态类型,其中添加最终关键字将提高代码质量。
-Wsuggest-override Suggest that the override keyword be used when the declaration of a virtual function overrides another. 建议在虚拟函数声明覆盖另一个函数时使用覆盖关键字。
-Wsurprising Warn about “suspicious” constructs. 警告“可疑”结构。
-Wswitch Warn about enumerated switches, with no default, missing a case. 警告关于枚举的开关,没有默认值,缺少一个案例。
-Wswitch-bool Warn about switches with boolean controlling expression. 警告有关使用布尔控制表达式的开关。
-Wswitch-default Warn about enumerated switches missing a “default:” statement. 警告关于枚举的开关缺少一个“默认值:”语句。
-Wswitch-enum Warn about all enumerated switches missing a specific case. 警告所有枚举的开关都缺少一个特定的情况。
-Wswitch-outside-range Warn about switch values that are outside of the switch’s type range. 警告那些超出开关类型范围的开关值。
-Wswitch-unreachable Warn about statements between switch’s controlling expression and the first case. 警告开关的控制表达式和第一种情况之间的语句。
-Wsync-nand Warn when sync_fetch_and_nand and sync_nand_and_fetch built-in functions are used. 当使用sync_fetcc_和_n和和sync_n和_and_获取内置函数时发出警告。
-Wsynth Deprecated. This switch has no effect. 已弃用。此开关没有任何作用。
-Wsystem-headers Do not suppress warnings from system headers. 不要抑制系统标头的警告。
-Wtabs Permit nonconforming uses of the tab character. 允许使用非卡字符。
-Wtarget-lifetime Warn if the pointer in a pointer assignment might outlive its target. 如果指针分配中的指针可能超过其目标,请发出警告。
-Wtautological-compare Warn if a comparison always evaluates to true or false. 如果比较总是为真或假,请警告。
-Wtemplates Warn on primary template declaration. 警告主模板声明。
-Wterminate Warn if a throw expression will always result in a call to terminate(). 如果抛出表达式总是导致调用终止(),请发出警告。
-Wtraditional Warn about features not present in traditional C. 警告传统C语中没有的功能。
-Wtraditional-conversion Warn of prototypes causing type conversions different from what would happen in the absence of prototype. 对原型导致类型转换的警告与没有原型时可能发生的情况不同。
-Wtrampolines Warn whenever a trampoline is generated. 请在生成蹦床时发出警告。
-Wtrigraphs Warn if trigraphs are encountered that might affect the meaning of the program. 如果遇到可能影响程序意义的触发,请发出警告。
-Wtsan Warn about unsupported features in ThreadSanitizer. 警告有关线程消毒器中不支持的功能。
-Wtype-limits Warn if a comparison is always true or always false due to the limited range of the data type. 如果由于数据类型的范围有限,比较总是为真或总是为假,请发出警告。
-Wundeclared-selector Warn about @selector()s without previously declared methods. 警告关于没有以前声明的方法的@选择器()。
-Wundef Warn if an undefined macro is used in an #if directive. 如果在#if指令中使用了未定义的宏,请发出警告。
-Wundefined-do-loop Warn about an invalid DO loop. 警告关于一个无效的DO循环。
-Wunderflow Warn about underflow of numerical constant expressions. 警告数值常数表达式的欠流。
-Wuninitialized Warn about uninitialized automatic variables. 警告有关未初始化的自动变量。
-Wunknown-pragmas Warn about unrecognized pragmas. 警告未被认可的语用。
-Wunreachable-code Does nothing. Preserved for backward compatibility. 什么也不做。保留了向后兼容性。
-Wunsafe-loop-optimizations Does nothing. Preserved for backward compatibility. 什么也不做。保留了向后兼容性。
-Wunsuffixed-float-constants Warn about unsuffixed float constants. 警告有关未带后缀的浮动常数。
-Wunused Enable all -Wunused- warnings. 启用所有wunused警告。
-Wunused-but-set-parameter Warn when a function parameter is only set, otherwise unused. 仅设置函数参数时发出警告,否则未使用。
-Wunused-but-set-variable Warn when a variable is only set, otherwise unused. 当仅设置变量时发出警告,否则未使用。
-Wunused-const-variable Warn when a const variable is unused. Same as -Wunused-const-variable=. 常变量未使用时发出警告。与小常变量=相同。
-Wunused-const-variable=<0,2> Warn when a const variable is unused. 常变量未使用时发出警告。
-Wunused-dummy-argument Warn about unused dummy arguments. 警告有关未使用的虚拟参数。
-Wunused-function Warn when a function is unused. 当一个函数未使用时,请发出警告。
-Wunused-label Warn when a label is unused. 当标签未使用时,请发出警告。
-Wunused-local-typedefs Warn when typedefs locally defined in a function are not used. 当未使用函数中本地定义的类型定义时发出警告。
-Wunused-macros Warn about macros defined in the main file that are not used. 警告在主文件中定义的未使用的宏。
-Wunused-parameter Warn when a function parameter is unused. 当函数参数未使用时,请发出警告。
-Wunused-result Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value. 如果用属性警告_未使用的_结果标记的函数的调用者没有使用其返回值,则会发出警告。
-Wunused-value Warn when an expression value is unused. 当表达式值未使用时,请发出警告。
-Wunused-variable Warn when a variable is unused. 当变量未使用时,请发出警告。
-Wuse-without-only Warn about USE statements that have no ONLY qualifier. 警告关于没有唯一限定符的USE语句。
-Wuseless-cast Warn about useless casts. 警告无用的演员。
-Wvarargs Warn about questionable usage of the macros used to retrieve variable arguments. 警告有关用于检索变量参数的宏的使用有问题。
-Wvariadic-macros Warn about using variadic macros. 警告不要使用可变的宏。
-Wvector-operation-performance Warn when a vector operation is compiled outside the SIMD. 当在SIMD之外编译向量操作时,请发出警告。
-Wvexing-parse Warn about the most vexing parse syntactic ambiguity. 警告最令人烦恼的解析语法歧义。
-Wvirtual-inheritance Warn on direct virtual inheritance. 警告直接虚拟继承。
-Wvirtual-move-assign Warn if a virtual base has a non-trivial move assignment operator. 如果虚拟基础具有重要的移动分配操作符,请发出警告。
-Wvla Warn if a variable length array is used. 如果使用了可变长度的数组,请发出警告。
-Wvla-larger-than= Warn on unbounded uses of variable-length arrays, and on bounded uses of variable-length arrays whose bound can be larger than bytes. 警告对可变长度数组的无界使用,以及对边界可以大于<数>字节的可变长度数组的有界使用。
-Wvla-parameter Warn about mismatched declarations of VLA parameters. 警告有关VLA参数的声明不匹配。
-Wvolatile Warn about deprecated uses of volatile qualifier. 警告,不要不建议使用不稳定的限定符。
-Wvolatile-register-var Warn when a register variable is declared volatile. 当寄存器变量声明为不稳定时发出警告。
-Wwrite-strings In C++, nonzero means warn about deprecated conversion from string literals to ‘char *’. In C, similar warning, except that the conversion is of course not deprecated by the ISO C standard. 在C++中,非零意味着警告从字符串字符到char*的废弃转换。在C中,类似的警告,除了转换当然没有被ISO C标准弃用。
-Wzero-as-null-pointer-constant Warn when a literal ‘0’ is used as null pointer. 当将文字“0”用作空指针时,会发出警告。
-Wzero-length-bounds Warn about accesses to interior zero-length array members. 警告不要访问内部零长度数组成员。
-Wzerotrip Warn about zero-trip DO loops. 警告关于零行程的DO循环。
-frequire-return-statement Functions which return values must end with return statements. 返回值的函数必须以返回语句结束。

说明

本文翻译使用的是,WPS的自带翻译功能。笔者简单的略了一遍,稍微改了点一眼就能看出来的机翻问题。

但肯定还有很多问题,请自行阅读原文理解和使用。




END

python 三方翻译库

一开始找了个python库写了个脚本翻译。

在写完脚本自己测试时才发现,这个库真垃圾,有每日使用次数(应该是联网的),异常率高,机翻中的机翻。

from translate import Translator

tran = Translator(from_lang="English", to_lang="Chinese")
print(tran.translate("Hello Wolrd!"))

关注我,学习更多C/C++,算法,计算机知识

B站:

👨‍💻主页:天赐细莲 bilibili

相关推荐

  1. Linux——gcc

    2024-04-30 01:38:03       32 阅读
  2. 项目管理含义

    2024-04-30 01:38:03       63 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-30 01:38:03       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-30 01:38:03       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-30 01:38:03       87 阅读
  4. Python语言-面向对象

    2024-04-30 01:38:03       96 阅读

热门阅读

  1. docker数据卷

    2024-04-30 01:38:03       32 阅读
  2. 24年第一篇:个人小记

    2024-04-30 01:38:03       32 阅读
  3. 考研数学精选题目016

    2024-04-30 01:38:03       30 阅读
  4. 【题解】NowCoder 除2!

    2024-04-30 01:38:03       29 阅读
  5. 八大元素定位方法

    2024-04-30 01:38:03       33 阅读
  6. ASIM复现相关知识补充

    2024-04-30 01:38:03       32 阅读
  7. LeetCode 刷题 -- Day 6

    2024-04-30 01:38:03       34 阅读
  8. 保护您的连接:无线网络安全探究

    2024-04-30 01:38:03       36 阅读
  9. vue的build先上部署的 devServer不生效的场景记录

    2024-04-30 01:38:03       35 阅读
  10. 乐观锁和悲观锁

    2024-04-30 01:38:03       38 阅读
  11. [SQL系列]从零开始学Clickhouse——集群篇

    2024-04-30 01:38:03       36 阅读
  12. stable diffusion本地部署顺序

    2024-04-30 01:38:03       37 阅读