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-warningsSame as -Wall.和Wall一样。
–extra-warningsSame as -Wextra.和Wextra一样。
-WThis switch is deprecated; use -Wextra instead. Same as -Wextra.此开关已被弃用;使用-Wextra代替。和Wextra一样。
-WNSObject-attributeWarn if the NSObject attribute is applied to a non-typedef.如果NSObject属性应用于非类型定义,请发出警告。
-WabiWarn about things that will change when compiling with an ABI-compliant compiler.警告在使用兼容abi的编译器进行编译时可能会发生变化的事情。
-Wabi-tagWarn 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-valueWarn on suspicious calls of standard functions computing absolute values.警告对计算绝对值的标准函数的可疑调用。
-WaddressWarn about suspicious uses of memory addresses.警告有关可疑使用内存地址的问题。
-Waddress-of-packed-memberWarn when the address of packed member of struct or union is taken.记录包装结构或工会成员的地址时发出警告。
-Waggregate-returnWarn about returning structures, unions or arrays.警告不要返回struct、union或array。
-Waggressive-loop-optimizationsWarn if a loop with constant number of iterations triggers undefined behavior.如果迭代次数不变的循环触发未定义行为,请发出警告。
-WaliasingWarn about possible aliasing of dummy arguments.警告有关虚拟参数可能出现的混叠。
-Walign-commonsWarn about alignment of COMMON blocks.警告有关公共方块的对齐情况。
-Waligned-new=[noneglobal全局的。
-WallEnable 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-zeroWarn for calls to allocation functions that specify zero bytes.警告对指定零字节的分配函数的调用。
-WallocaWarn 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.警告分配器的无界使用,以及有界的边界可以大于 字节的分配器的使用。
-WampersandWarn about missing ampersand in continued character constants.警告在连续字符常数中丢失超级符。
-Wanalyzer-double-fcloseWarn about code paths in which a stdio FILE can be closed more than once.警告有关可以多次关闭stdio文件的代码路径。
-Wanalyzer-double-freeWarn about code paths in which a pointer can be freed more than once.警告可以多次释放指针的代码路径。
-Wanalyzer-exposure-through-output-fileWarn about code paths in which sensitive data is written to a file.警告有关将敏感数据写入文件的代码路径。
-Wanalyzer-file-leakWarn about code paths in which a stdio FILE is not closed.警告有关未关闭标准文件的代码路径。
-Wanalyzer-free-of-non-heapWarn about code paths in which a non-heap pointer is freed.警告有关释放非堆指针的代码路径。
-Wanalyzer-malloc-leakWarn about code paths in which a heap-allocated pointer leaks.警告其中有堆分配的指针泄漏的代码路径。
-Wanalyzer-mismatching-deallocationWarn about code paths in which the wrong deallocation function is called.警告有关在其中调用了错误的释放函数的代码路径。
-Wanalyzer-null-argumentWarn about code paths in which NULL is passed to a must-not-be-NULL function argument.警告有关将NULL传递给必须非NULL函数参数的代码路径。
-Wanalyzer-null-dereferenceWarn about code paths in which a NULL pointer is dereferenced.警告有关在其中取消引用NULL指针的代码路径。
-Wanalyzer-possible-null-argumentWarn about code paths in which a possibly-NULL value is passed to a must-not-be-NULL function argument.警告有关如何将可能为NULL的值传递给必须不为NULL的函数参数的代码路径。
-Wanalyzer-possible-null-dereferenceWarn about code paths in which a possibly-NULL pointer is dereferenced.警告有关取消引用可能为空的指针的代码路径。
-Wanalyzer-shift-count-negativeWarn about code paths in which a shift with negative count is attempted.警告有关尝试使用负计数进行移位的代码路径。
-Wanalyzer-shift-count-overflowWarn about code paths in which a shift with count >= width of type is attempted.警告尝试使用计数>=宽度的移位的代码路径。
-Wanalyzer-stale-setjmp-bufferWarn 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-indexWarn about code paths in which an unsanitized value is used as an array index.警告有关将未清理的值用作数组索引的代码路径。
-Wanalyzer-too-complexWarn if the code is too complicated for the analyzer to fully explore.如果代码太复杂,分析器无法完全探索,请发出警告。
-Wanalyzer-unsafe-call-within-signal-handlerWarn about code paths in which an async-signal-unsafe function is called from a signal handler.警告有关从信号处理程序调用异步信号不安全函数的代码路径。
-Wanalyzer-use-after-freeWarn about code paths in which a freed value is used.警告有关使用释放值的代码路径。
-Wanalyzer-use-of-pointer-in-stale-stack-frameWarn about code paths in which a pointer to a stale stack frame is used.警告如何使用指向陈旧堆栈帧的指针的代码路径。
-Wanalyzer-write-to-constWarn about code paths which attempt to write to a const object.警告有关试图写入const对象的代码路径。
-Wanalyzer-write-to-string-literalWarn about code paths which attempt to write to a string literal.警告有关试图写入字符串文字的代码路径。
-Warith-conversionWarn if conversion of the result of arithmetic might change the value even though converting the operands cannot.警告,如果转换算术结果可能会更改值,即使转换操作数不能。
-Warray-boundsWarn if an array is accessed out of bounds.如果数组,请发出警告。
-Warray-bounds=<0,2>Warn if an array is accessed out of bounds.如果数组,请发出警告。
-Warray-parameterWarn 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-temporariesWarn about creation of array temporaries.警告如何创建数组临时文件。
-Wassign-interceptWarn whenever an Objective-C assignment is being intercepted by the garbage collector.当垃圾收集器拦截目标c分配时,请发出警告。
-Wattribute-aliasWarn 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-warningWarn about uses of attribute((warning)) declarations.警告不要使用attribute((warning))声明。
-WattributesWarn about inappropriate attribute usage.请警告有关不适当的属性使用。
-Wbad-function-castWarn about casting functions to incompatible types.警告不要将函数转换为不兼容的类型。
-Wbool-compareWarn about boolean expression compared with an integer value different from true/false.警告关于布尔表达式与不同于true/false的整数值的比较。
-Wbool-operationWarn about certain operations on boolean expressions.警告有关布尔表达式上的某些操作。
-Wbuiltin-declaration-mismatchWarn when a built-in function is declared with the wrong signature.当内置函数声明了错误的签名时,会发出警告。
-Wbuiltin-macro-redefinedWarn when a built-in preprocessor macro is undefined or redefined.内置预处理器宏未定义或重新定义时发出警告。
-Wc+±compatWarn about C constructs that are not in the common subset of C and C++.警告不在C和C++的共同子集中的C构造。
-Wc++0x-compatSame as -Wc++11-compat.与Wc++11-compat相同。
-Wc++11-compatWarn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011.警告C++结构的含义在ISO C++ 1998和ISO C++ 2011之间有所不同。
-Wc++14-compatWarn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014.警告那些在ISO C++ 2011和ISO C++ 2014之间含义不同的C++结构。
-Wc++17-compatWarn about C++ constructs whose meaning differs between ISO C++ 2014 and ISO C++ 2017.警告那些在ISO C++ 2014和ISO C++ 2017之间含义不同的C++结构。
-Wc++1z-compatSame as -Wc++17-compat.与Wc++17-compat相同。
-Wc++20-compatWarn about C++ constructs whose meaning differs between ISO C++ 2017 and ISO C++ 2020.警告C++结构在ISO C++ 2017和ISO C++ 2020之间有不同的含义。
-Wc++2a-compatSame as -Wc++20-compat.与wc++20compat相同。
-Wc-binding-typeWarn if the type of a variable might be not interoperable with C.如果一个变量的类型可能不能与C互操作,请发出警告。
-Wc11-c2x-compatWarn about features not present in ISO C11, but present in ISO C2X.警告在ISO C11中不存在,但在ISO C2X中存在的特性。
-Wc90-c99-compatWarn about features not present in ISO C90, but present in ISO C99.警告在ISO C90中不存在,但在ISO C99中存在的功能。
-Wc99-c11-compatWarn about features not present in ISO C99, but present in ISO C11.警告在ISO C99中不存在,但在ISO C11中存在的特性。
-Wcannot-profileWarn when profiling instrumentation was requested, but could not be applied to a certain function.当请求分析仪器,但不能应用于某个功能时,请发出警告。
-Wcast-alignWarn about pointer casts which increase alignment.警告关于增加对齐程度的指针投射。
-Wcast-align=strictWarn about pointer casts which increase alignment.警告关于增加对齐程度的指针投射。
-Wcast-function-typeWarn about casts between incompatible function types.警告注意不兼容的函数类型之间的类型转换。
-Wcast-qualWarn about casts which discard qualifiers.警告有关丢弃限定符的强制转换。
-Wcast-resultWarn about casts that will produce a null result.警告有关将产生空结果的强制转换。
-Wcatch-valueWarn 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-subscriptsWarn about subscripts whose type is “char”.警告有关其类型为“char”的下标。
-Wcharacter-truncationWarn about truncated character expressions.警告不要截断字符表达式。
-WchkpRemoved in GCC 9. This switch has no effect.已在GCC 9中删除。此开关没有任何作用。
-Wclass-conversionWarn when a conversion function will never be called due to the type it converts to.当转换函数由于转换的类型而无法调用时发出警告。
-Wclass-memaccessWarn for unsafe raw memory writes to objects of class types.警告对类类型的对象的不安全的原始内存写入。
-WclobberedWarn about variables that might be changed by “longjmp” or “vfork”.警告可能被“longjmp”或“vfork”更改的变量。
-Wcomma-subscriptWarn about uses of a comma operator within a subscripting expression.警告不要在下标表达式中使用逗号运算符。
-WcommentWarn about possibly nested block comments, and C++ comments spanning more than one physical line.警告可能嵌套的块注释和跨越多个物理行的C++注释。
-WcommentsSynonym for -Wcomment. Same as -Wcomment.-Watem的同义词。和评论一样。
-Wcompare-realsWarn about equality comparisons involving REAL or COMPLEX expressions.警告注意涉及真实或复杂表达式的等式比较。
-Wconditionally-supportedWarn for conditionally-supported constructs.警告有条件支持的构造。
-WconversionWarn for implicit type conversions that may change a value.警告可能会更改值的隐式类型转换。
-Wconversion-extraWarn about most implicit conversions.警告大多数隐式转换。
-Wconversion-nullWarn for converting NULL from/to a non-pointer type.警告如何将NULL从/转换为非指针类型。
-Wcoverage-mismatchWarn in case profiles in -fprofile-use do not match.如果配置文件中的配置文件使用不匹配,请发出警告。
-WcppWarn when a #warning directive is encountered.当遇到#警告指令时,系统会发出警告。
-Wctad-maybe-unsupportedWarn when performing class template argument deduction on a type with no deduction guides.在没有演绎指南的类型上执行类模板参数演绎时,请发出警告。
-Wctor-dtor-privacyWarn when all constructors and destructors are private.当所有的构造函数和析构函数都是私有的时,请发出警告。
-Wdangling-elseWarn about dangling else.警告其他危险。
-Wdate-timeWarn about TIME, DATE and TIMESTAMP usage.警告有关时间、日期和时间戳的使用情况。
-Wdeclaration-after-statementWarn when a declaration is found after a statement.在语句后找到声明时发出警告。
-Wdelete-incompleteWarn when deleting a pointer to incomplete type.当删除指向不完整类型的指针时,会发出警告。
-Wdelete-non-virtual-dtorWarn about deleting polymorphic objects with non-virtual destructors.警告不要删除具有非虚拟析构函数的多态对象。
-WdeprecatedWarn if a deprecated compiler feature, class, method, or field is used.如果使用了已弃用的编译器特性、类、方法或字段,请发出警告。
-Wdeprecated-copyMark implicitly-declared copy operations as deprecated if the class has a user-provided copy operation.如果类具有用户提供的复制操作,则将隐式声明的复制操作标记为已弃用。
-Wdeprecated-copy-dtorMark implicitly-declared copy operations as deprecated if the class has a user-provided copy operation or destructor.如果类具有用户提供的复制操作或析构函数,则将隐式声明的复制操作标记为已弃用。
-Wdeprecated-declarationsWarn about uses of attribute((deprecated)) declarations.警告不要使用attribute((deprecated)) 声明。
-Wdeprecated-enum-enum-conversionWarn about deprecated arithmetic conversions on operands of enumeration types.警告枚举类型操作数的算术转换。
-Wdeprecated-enum-float-conversionWarn about deprecated arithmetic conversions on operands where one is of enumeration type and the other is of a floating-point type.警告禁止使用操作数的枚举类型和操作数的浮点类型的算术转换。
-Wdesignated-initWarn about positional initialization of structs requiring designated initializers.警告有关需要指定初始化器的结构的位置初始化。
-Wdisabled-optimizationWarn when an optimization pass is disabled.当禁用优化通过时,会发出警告。
-Wdiscarded-array-qualifiersWarn if qualifiers on arrays which are pointer targets are discarded.如果丢弃了作为指针目标数组上的限定符,请发出警告。
-Wdiscarded-qualifiersWarn if type qualifiers on pointers are discarded.如果丢弃了指针上的类型限定符,请发出警告。
-Wdiv-by-zeroWarn about compile-time integer division by zero.警告关于编译时整数除以零。
-Wdo-subscriptWarn about possibly incorrect subscripts in do loops.警告在do循环中可能有不正确的下标。
-Wdouble-promotionWarn about implicit conversions from “float” to “double”.警告关于从“浮动”到“双倍”的隐式转换。
-Wduplicate-decl-specifierWarn when a declaration has duplicate const, volatile, restrict or _Atomic specifier.当声明有重复的常量、易失性、限制或_原子说明符时,请发出警告。
-Wduplicated-branchesWarn about duplicated branches in if-else statements.警告在if-else语句中重复的分支。
-Wduplicated-condWarn about duplicated conditions in an if-else-if chain.警告如果链中的重复条件。
-Weffc++Warn about violations of Effective C++ style rules.警告是否违反了有效的C-++样式规则。
-Wempty-bodyWarn about an empty body in an if or else statement.在if或else语句中警告一个空体。
-Wendif-labelsWarn about stray tokens after #else and #endif.警告在#else和#endif之后的丢失标记。
-Wenum-compareWarn about comparison of different enum types.警告有关不同枚举类型的比较。
-Wenum-conversionWarn about implicit conversion of enum types.请警告有关枚举类型的隐式转换。
-Werror-implicit-function-declarationThis switch is deprecated; use -Werror=implicit-function-declaration instead. Same as -Werror=.此开关已弃用;改为使用-Werror=隐式函数声明。与Werror=相同。
-WexceptionsWarn when an exception handler is shadowed by another handler.当一个异常处理程序被另一个处理程序跟踪时,系统会发出警告。
-Wexpansion-to-definedWarn if “defined” is used outside #if.如果“定义”在#外部使用,请警告。
-WextraPrint extra (possibly unwanted) warnings.打印额外的(可能是不需要的)警告。
-Wextra-semiWarn about semicolon after in-class function definition.类内函数定义后警告分号。
-Wfloat-conversionWarn for implicit type conversions that cause loss of floating point precision.警告会导致浮点精度损失的隐式类型转换。
-Wfloat-equalWarn if testing floating point numbers for equality.如果测试浮点数是否相同,请发出警告。
-WformatWarn about printf/scanf/strftime/strfmon format string anomalies. Same as -Wformat=.警告关于打印/扫描/扫描格式字符串异常。与Wformad=相同。
-Wformat-contains-nulWarn about format strings that contain NUL bytes.警告有关包含NUL字节的格式字符串。
-Wformat-diagWarn about GCC format strings with strings unsuitable for diagnostics.警告不要使用不适合诊断的字符串的GCC格式字符串。
-Wformat-extra-argsWarn if passing too many arguments to a function for its format string.如果向函数的格式字符串传递了太多的参数,请发出警告。
-Wformat-nonliteralWarn 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-securityWarn about possible security problems with format functions.警告格式函数可能存在的安全问题。
-Wformat-signednessWarn about sign differences with format functions.警告不要使用格式函数的符号差异。
-Wformat-truncationWarn 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-y2kWarn about strftime formats yielding 2-digit years.警告产生2位数年份的时间格式。
-Wformat-zero-lengthWarn about zero-length formats.警告零长度格式。
-Wformat=<0,2>Warn about printf/scanf/strftime/strfmon format string anomalies.警告关于打印/扫描/扫描格式字符串异常。
-Wframe-addressWarn 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-objectWarn when attempting to free a non-heap object.当试图释放非堆对象时,应发出警告。
-Wfunction-eliminationWarn about function call elimination.警告有关函数调用消除。
-WhsaDoes nothing. Preserved for backward compatibility.什么也不做。保留了向后兼容性。
-Wif-not-alignedWarn when the field in a struct is not aligned.在结构中的字段未对齐时发出警告。
-Wignored-attributesWarn whenever attributes are ignored.每当忽略属性时,请发出警告。
-Wignored-qualifiersWarn whenever type qualifiers are ignored.请在无论何时忽略类型限定符时发出警告。
-WimplicitWarn about implicit declarations.请警告有关隐式声明的信息。
-Wimplicit-fallthroughSame 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-declarationWarn about implicit function declarations.请警告有关隐式函数声明的信息。
-Wimplicit-intWarn when a declaration does not specify a type.当声明未指定类型时,请发出警告。
-Wimplicit-interfaceWarn about calls with implicit interface.警告不要使用隐式接口的调用。
-Wimplicit-procedureWarn about called procedures not explicitly declared.警告有关未明确声明的已调用过程。
-Winaccessible-baseWarn when a base is inaccessible in derived due to ambiguity.当由于模糊性而无法访问一个碱基时,请发出警告。
-Wincompatible-pointer-typesWarn when there is a conversion between pointers that have incompatible types.当具有不兼容类型的指针之间发生转换时,请发出警告。
-Winherited-variadic-ctorWarn about C++11 inheriting constructors when the base has a variadic constructor.当基有一个变量构造函数时,警告C++11继承构造函数。
-Winit-list-lifetimeWarn about uses of std::initializer_list that can result in dangling pointers.警告使用std::initializer_list可能导致悬空指针。
-Winit-selfWarn about variables which are initialized to themselves.警告那些已初始化为它们自己的变量。
-WinlineWarn when an inlined function cannot be inlined.当内联函数不能内联时,会发出警告。
-Wint-conversionWarn about incompatible integer to pointer and pointer to integer conversions.警告与整数指针和整数转换的指针不兼容。
-Wint-in-bool-contextWarn for suspicious integer expressions in boolean context.请对布尔上下文中的可疑整数表达式发出警告。
-Wint-to-pointer-castWarn when there is a cast to a pointer from an integer of a different size.当有一个从不同大小的整数转换到指针时发出警告。
-Winteger-divisionWarn about constant integer divisions with truncated results.警告有关具有截断结果的常量整数除法。
-Wintrinsic-shadowWarn if a user-procedure has the same name as an intrinsic.如果用户过程与内在过程的名称相同,则会发出警告。
-Wintrinsics-stdWarn on intrinsics not part of the selected standard.警告内在因素不是所选标准的一部分。
-Winvalid-imported-macrosWarn about macros that have conflicting header units definitions.警告存在头单元定义冲突的宏。
-Winvalid-memory-modelWarn when an atomic memory model parameter is known to be outside the valid range.当已知原子内存模型参数超出有效范围时,请发出警告。
-Winvalid-offsetofWarn about invalid uses of the “offsetof” macro.警告关于“抵消”宏的无效使用。
-Winvalid-pchWarn about PCH files that are found but not used.警告已找到但未使用的PCH文件。
-Wjump-misses-initWarn when a jump misses a variable initialization.当跳转缺少变量初始化时,会发出警告。
-Wlarger-than-Same as -Wlarger-than=.和wmager一样——比=。
-Wlarger-than=Warn if an object’s size exceeds .如果对象的大小超过了,请发出警告。
-Wline-truncationWarn about truncated source lines.警告有关截断的源行。
-Wliteral-suffixWarn when a string or character literal is followed by a ud-suffix which does not begin with an underscore.当字符串或字符文字后跟一个不以下划线开头的ud-后缀时,会发出警告。
-Wlogical-not-parenthesesWarn when logical not is used on the left hand side operand of a comparison.在比较的左侧操作数上使用逻辑非时发出警告。
-Wlogical-opWarn when a logical operator is suspiciously always evaluating to true or false.当逻辑运算符总是可疑地计算为真或假时,请发出警告。
-Wlong-longDo not warn about using “long long” when -pedantic.不要警告使用“long long”时-迂腐。
-Wlto-type-mismatchDuring link time optimization warn about mismatched types of global declarations.在链接时间优化期间,会对全局声明的不匹配类型发出警告。
-WmainWarn about suspicious declarations of “main”.警告有关可疑的“主要”声明。
-Wmaybe-uninitializedWarn about maybe uninitialized automatic variables.警告有关可能未初始化的自动变量。
-Wmemset-elt-sizeWarn about suspicious calls to memset where the third argument contains the number of elements not multiplied by the element size.警告关于对模集的可疑调用,其中第三个参数包含不乘以元素大小的元素数量。
-Wmemset-transposed-argsWarn about suspicious calls to memset where the third argument is constant literal zero and the second is not.警告对模集的可疑调用,其中第三个参数是常数零,第二个参数不是。
-Wmisleading-indentationWarn when the indentation of the code does not reflect the block structure.当代码的缩进没有反映块结构时,请发出警告。
-Wmismatched-deallocWarn for deallocation calls with arguments returned from mismatched allocation functions.警告使用从不匹配的分配函数返回的参数的释放调用。
-Wmismatched-new-deleteWarn for mismatches between calls to operator new or delete and the corresponding call to the allocation or deallocation function.警告对操作符新或删除的调用与对分配或释放函数的相应调用之间的不匹配。
-Wmismatched-tagsWarn when a class is redeclared or referenced using a mismatched class-key.当使用不匹配的类键重新声明或引用类时,请发出警告。
-Wmissing-attributesWarn about declarations of entities that may be missing attributes that related entities have been declared with.警告有关可能缺少已声明相关实体的属性的实体的声明。
-Wmissing-bracesWarn about possibly missing braces around initializers.警告在初始化器周围可能缺少大括号。
-Wmissing-declarationsWarn about global functions without previous declarations.警告关于没有以前声明的全局函数。
-Wmissing-field-initializersWarn about missing fields in struct initializers.警告结构初始化器中缺少的字段。
-Wmissing-format-attributeSame as -Wsuggest-attribute=format.与-Winde-属性=格式相同。
-Wmissing-include-dirsWarn about user-specified include directories that do not exist.警告有关用户指定的包含不存在的目录。
-Wmissing-noreturnSame as -Wsuggest-attribute=noreturn.与-Winde-属性=返回相同。
-Wmissing-parameter-typeWarn about function parameters declared without a type specifier in K&R-style functions.警告在K&r类型函数中声明的没有类型说明符的函数参数。
-Wmissing-profileWarn in case profiles in -fprofile-use do not exist.如果配置文件中不存在,请警告。
-Wmissing-prototypesWarn about global functions without prototypes.警告关于没有原型的全局函数。
-WmulticharWarn about use of multi-character character constants.警告不要使用多字符字符常量。
-Wmultiple-inheritanceWarn on direct multiple inheritance.警告直接多重继承。
-Wmultistatement-macrosWarn 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。
-WnamespacesWarn on namespace definition.对命名空间定义发出警告。
-WnarrowingWarn about narrowing conversions within { } that are ill-formed in C++11.警告要缩小C++11中畸形的{}内的转换。
-Wnested-externsWarn about “extern” declarations not at file scope.警告不要在文件范围内的“外部”声明。
-Wno-alloc-size-larger-thanDisable 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-thanDisable Walloca-larger-than= warning. Equivalent to Walloca-larger-than=<SIZE_MAX> or larger. Same as -Walloca-larger-than=.禁用大于=的=警告。相当于沃尔洛卡-大于=<SIZE_MAX>或更大。和沃洛卡一样——比=大。
-Wno-frame-larger-thanDisable -Wframe-larger-than= warning. Equivalent to -Wframe-larger-than=<SIZE_MAX> or larger. Same as -Wframe-larger-than=.禁用“大于=”警告。相当于-Wframe-大于-=<SIZE_MAX>或更大。和wframe一样——比=大。
-Wno-larger-thanDisable -Wlarger-than= warning. Equivalent to -Wlarger-than=<SIZE_MAX> or larger. Same as -Wlarger- than=.禁用-Wlamer-比=警告。相当于-大于=<SIZE_MAX>或更大。和=一样。
-Wno-stack-usageDisable Wstack-usage= warning. Equivalent to Wstack-usage=<SIZE_MAX> or larger. Same as -Wstack-usage=.禁用Wstack-使用=警告。相当于堆栈使用=<SIZE_MAX>或更大。与wstack使用=相同。
-Wno-vla-larger-thanDisable Wvla-larger-than= warning. Equivalent to Wvla-larger-than=<SIZE_MAX> or larger. Same as -Wvla- larger-than=.禁用Wvla-大于=的警告。相当于Wvla-大于=<SIZE_MAX>或更大。和wvlalarger一样——比=。
-WnoexceptWarn when a noexcept expression evaluates to false even though the expression can’t actually throw.当一个例外表达式计算为false时发出警告,即使该表达式实际上不能抛出。
-Wnoexcept-typeWarn if C++17 noexcept function type will change the mangled name of a symbol.警告C++17除了函数类型将更改符号的混乱名称。
-Wnon-template-friendWarn when non-templatized friend functions are declared within a template.在模板中声明非模板化的朋友函数时发出警告。
-Wnon-virtual-dtorWarn about non-virtual destructors.警告有关非虚拟析构函数。
-WnonnullWarn about NULL being passed to argument slots marked as requiring non-NULL.警告不要将NULL传递给标记为需要非NULL的参数插槽。
-Wnonnull-compareWarn if comparing pointer parameter with nonnull attribute with NULL.如果将指针参数与非空属性与NULL进行比较,请发出警告。
-WnormalizedSame as -Wnormalized=nfc (or, in negated form, -Wnormalized=none).与-标准化=nfc相同(或者,以否定的形式,-标准化=none)。
-Wnormalized=[noneidid
-Wnull-dereferenceWarn if dereferencing a NULL pointer may lead to erroneous or undefined behavior.如果取消引用空指针可能导致错误或未定义的行为,请发出警告。
-Wobjc-root-classWarn if a class interface has no superclass. Root classes may use an attribute to suppress this warning.如果一个类接口没有超类,请发出警告。根类可以使用一个属性来抑制此警告。
-WodrWarn about some C++ One Definition Rule violations during link time optimization.在链接时间优化期间,警告一些C++一定义规则的违反。
-Wold-style-castWarn if a C-style cast is used in a program.在程序中使用c样式转换时发出警告。
-Wold-style-declarationWarn for obsolescent usage in a declaration.警告声明中的过时用法。
-Wold-style-definitionWarn if an old-style parameter definition is used.如果使用了旧式样式的参数定义,请发出警告。
-Wopenmp-simdWarn if a simd directive is overridden by the vectorizer cost model.如果一个simd指令被向量转换器成本模型覆盖,请发出警告。
-WoverflowWarn about overflow in arithmetic expressions.警告有关算术表达式中的溢出。
-Woverlength-stringsWarn if a string is longer than the maximum portable length specified by the standard.如果字符串超过该标准指定的最大可移动长度,请发出警告。
-Woverloaded-virtualWarn about overloaded virtual function names.警告有关重载的虚拟函数名称。
-Woverride-initWarn about overriding initializers without side effects.警告不要覆盖初始化器而没有副作用。
-Woverride-init-side-effectsWarn about overriding initializers with side effects.警告说要用副作用覆盖初始化器。
-Woverwrite-recursiveWarn that -fno-automatic may break recursion.警告说,自动识别可能会破坏递归。
-WpackedWarn when the packed attribute has no effect on struct layout.当打包的属性对结构布局没有影响时,请发出警告。
-Wpacked-bitfield-compatWarn about packed bit-fields whose offset changed in GCC 4.4.警告在GCC 4.4中偏移量发生变化的填充位字段。
-Wpacked-not-alignedWarn when fields in a struct with the packed attribute are misaligned.当具有填充属性的结构中的字段不对齐时,请发出警告。
-WpaddedWarn when padding is required to align structure members.需要填充对齐结构构件时发出警告。
-WparenthesesWarn about possibly missing parentheses.警告可能缺少圆括号。
-WpedanticIssue warnings needed for strict compliance to the standard.发出严格遵守该标准所需的警告。
-Wpessimizing-moveWarn about calling std::move on a local object in a return statement preventing copy elision.警告不要调用std::在返回语句中移动本地对象,防止复制省略。
-Wplacement-newWarn for placement new expressions with undefined behavior. Same as -Wplacement-new=.警告如何放置具有未定义行为的新表达式。和新的=一样。
-Wplacement-new=<0,2>Warn for placement new expressions with undefined behavior.警告如何放置具有未定义行为的新表达式。
-Wpmf-conversionsWarn when converting the type of pointers to member functions.在将指针的类型转换为成员函数时,会发出警告。
-Wpointer-arithWarn about function pointer arithmetic.警告有关函数指针算法。
-Wpointer-compareWarn when a pointer is compared with a zero character constant.当将指针与零字符常数进行比较时,会发出警告。
-Wpointer-signWarn when a pointer differs in signedness in an assignment.当赋值中的符号不同时发出警告。
-Wpointer-to-int-castWarn when a pointer is cast to an integer of a different size.将指针转换为不同大小的整数时发出警告。
-WpragmasWarn about misuses of pragmas.警告滥用实用。
-Wprio-ctor-dtorWarn if constructor or destructors with priorities from 0 to 100 are used.如果使用优先级为0到100的构造函数或析构函数,请发出警告。
-Wproperty-assign-defaultWarn if a property for an Objective-C object has no assign semantics specified.如果目标c对象的属性没有指定的分配语义,请发出警告。
-WprotocolWarn if inherited methods are unimplemented.如果继承的方法未实现,请发出警告。
-WpsabiThis option lacks documentation.此选项缺少文档。
-Wrange-loop-constructWarn when a range-based for-loop is creating unnecessary copies.当基于范围的为循环创建不必要的副本时,请发出警告。
-Wreal-q-constantWarn about real-literal-constants with ‘q’ exponent-letter.用“q”指数字母警告实字面常数。
-Wrealloc-lhsWarn when a left-hand-side array variable is reallocated.在重新分配左侧数组变量时,会发出警告。
-Wrealloc-lhs-allWarn when a left-hand-side variable is reallocated.在重新分配左侧变量时发出警告。
-Wredundant-declsWarn about multiple declarations of the same object.警告有关同一对象的多个声明。
-Wredundant-moveWarn about redundant calls to std::move.警告冗调呼叫移动。
-Wredundant-tagsWarn when a class or enumerated type is referenced using a redundant class-key.当使用冗余的类键引用类或枚举类型时,请发出警告。
-WregisterWarn about uses of register storage specifier.警告如何使用寄存器存储说明符。
-WreorderWarn when the compiler reorders code.在编译器重新订购代码时发出警告。
-WrestrictWarn when an argument passed to a restrict-qualified parameter aliases with another argument.当参数传递给限制限定参数别名时发出警告。
-Wreturn-local-addrWarn about returning a pointer/reference to a local or temporary variable.警告不要返回指向本地或临时变量的指针/引用。
-Wreturn-typeWarn whenever a function’s return type defaults to “int” ©, or about inconsistent return types (C++).当函数的返回类型默认为“int”©,或关于不一致的返回类型(C++)时,请发出警告。
-Wscalar-storage-orderWarn on suspicious constructs involving reverse scalar storage order.警告涉及反向标量存储顺序的可疑构造。
-WselectorWarn if a selector has multiple methods.如果一个选择器有多个方法,请发出警告。
-Wsequence-pointWarn about possible violations of sequence point rules.警告可能违反序列点规则。
-WshadowWarn when one variable shadows another. Same as -Wshadow=global.当一个变量阴影另一个变量时发出警告。与Whood=全局相同。
-Wshadow-compatible-localSame as -Wshadow=compatible-local.与-Wshawde=兼容-本地相同。
-Wshadow-ivarWarn if a local declaration hides an instance variable.如果一个本地声明隐藏了一个实例变量,请发出警告。
-Wshadow-localSame as -Wshadow=local.与Whood=本地相同。
-Wshadow=compatible-localWarn when one local variable shadows another local variable or parameter of compatible type.当一个局部变量阴影另一个兼容类型的局部变量或参数时发出警告。
-Wshadow=globalWarn when one variable shadows another (globally). Same as -Wshadow.当一个变量阴影另一个变量(全局)时发出警告。与-Wshadle相同。
-Wshadow=localWarn when one local variable shadows another local variable or parameter.当一个局部变量阴影另一个局部变量或参数时发出警告。
-Wshift-count-negativeWarn if shift count is negative.如果班次计数为负数,请发出警告。
-Wshift-count-overflowWarn if shift count >= width of type.如果移位计数>=宽度类型的警告。
-Wshift-negative-valueWarn if left shifting a negative value.如果向左移动了一个负值,请发出警告。
-Wshift-overflowWarn 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-compareWarn about signed-unsigned comparisons.警告无符号-无符号比较。
-Wsign-conversionWarn for implicit type conversions between signed and unsigned integers.警告有符号整数和无符号整数之间的隐式类型转换。
-Wsign-promoWarn when overload promotes from unsigned to signed.当过载从未签名升级到已签名时,请发出警告。
-Wsized-deallocationWarn about missing sized deallocation functions.警告关于缺少大小的释放功能。
-Wsizeof-array-argumentWarn when sizeof is applied on a parameter declared as an array.当将大小应用于声明为数组的参数时,会发出警告。
-Wsizeof-array-divWarn 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-divWarn about suspicious divisions of two sizeof expressions that don’t work correctly with pointers.警告两个无法正确使用指针的大小表达式的可疑划分。
-Wsizeof-pointer-memaccessWarn about suspicious length parameters to certain string functions if the argument uses sizeof.如果参数使用sizeof,请警告某些字符串函数的可疑长度参数。
-Wstack-protectorWarn when not issuing stack smashing protection for some reason.由于某种原因不发出堆栈粉碎保护时,应发出警告。
-Wstack-usage=Warn if stack usage might exceed .如果堆栈使用量可能超过 ,请发出警告。
-Wstrict-aliasingWarn about code which might break strict aliasing rules.警告可能违反严格混叠规则的代码。
-Wstrict-aliasing=<0,3>Warn about code which might break strict aliasing rules.警告可能违反严格混叠规则的代码。
-Wstrict-null-sentinelWarn about uncasted NULL used as sentinel.警告未空空用作哨兵。
-Wstrict-overflowWarn about optimizations that assume that signed overflow is undefined.警告有关假定已签名溢出未定义的优化。
-Wstrict-overflow=<0,5>Warn about optimizations that assume that signed overflow is undefined.警告有关假定已签名溢出未定义的优化。
-Wstrict-prototypesWarn about unprototyped function declarations.警告关于非原型的函数声明。
-Wstrict-selector-matchWarn if type signatures of candidate methods do not match exactly.如果候选方法的类型签名不完全匹配,请发出警告。
-Wstring-compareWarn 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-overflowWarn 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-overreadWarn about reading past the end of a source array in string manipulation functions like memchr and memcpy.警告不要在memchr和memcpy等字符串操作函数中读取源数组的末端。
-Wstringop-truncationWarn about truncation in string manipulation functions like strncat and strncpy.警告关于在字符串操作功能如strncat和strncpy中的截断。
-Wsubobject-linkageWarn 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=coldWarn about functions which might be candidates for attribute((cold)).警告可能是attribute((cold))候选函数。
-Wsuggest-attribute=constWarn about functions which might be candidates for attribute((const)).警告可能是attribute((const))的候选函数。
-Wsuggest-attribute=formatWarn about functions which might be candidates for format attributes.警告那些可能是格式属性的候选函数。
-Wsuggest-attribute=mallocWarn about functions which might be candidates for attribute((malloc)).警告可能是attribute((malloc))的候选函数)。
-Wsuggest-attribute=noreturnWarn about functions which might be candidates for attribute((noreturn)).警告可能是attribute((noreturn))的候选函数。
-Wsuggest-attribute=pureWarn about functions which might be candidates for attribute((pure)).警告可能是attribute((pure))的候选函数。
-Wsuggest-final-methodsWarn about C++ virtual methods where adding final keyword would improve code quality.警告C++虚拟方法,其中添加最终关键字将提高代码质量。
-Wsuggest-final-typesWarn about C++ polymorphic types where adding final keyword would improve code quality.警告C++多态类型,其中添加最终关键字将提高代码质量。
-Wsuggest-overrideSuggest that the override keyword be used when the declaration of a virtual function overrides another.建议在虚拟函数声明覆盖另一个函数时使用覆盖关键字。
-WsurprisingWarn about “suspicious” constructs.警告“可疑”结构。
-WswitchWarn about enumerated switches, with no default, missing a case.警告关于枚举的开关,没有默认值,缺少一个案例。
-Wswitch-boolWarn about switches with boolean controlling expression.警告有关使用布尔控制表达式的开关。
-Wswitch-defaultWarn about enumerated switches missing a “default:” statement.警告关于枚举的开关缺少一个“默认值:”语句。
-Wswitch-enumWarn about all enumerated switches missing a specific case.警告所有枚举的开关都缺少一个特定的情况。
-Wswitch-outside-rangeWarn about switch values that are outside of the switch’s type range.警告那些超出开关类型范围的开关值。
-Wswitch-unreachableWarn about statements between switch’s controlling expression and the first case.警告开关的控制表达式和第一种情况之间的语句。
-Wsync-nandWarn when sync_fetch_and_nand and sync_nand_and_fetch built-in functions are used.当使用sync_fetcc_和_n和和sync_n和_and_获取内置函数时发出警告。
-WsynthDeprecated. This switch has no effect.已弃用。此开关没有任何作用。
-Wsystem-headersDo not suppress warnings from system headers.不要抑制系统标头的警告。
-WtabsPermit nonconforming uses of the tab character.允许使用非卡字符。
-Wtarget-lifetimeWarn if the pointer in a pointer assignment might outlive its target.如果指针分配中的指针可能超过其目标,请发出警告。
-Wtautological-compareWarn if a comparison always evaluates to true or false.如果比较总是为真或假,请警告。
-WtemplatesWarn on primary template declaration.警告主模板声明。
-WterminateWarn if a throw expression will always result in a call to terminate().如果抛出表达式总是导致调用终止(),请发出警告。
-WtraditionalWarn about features not present in traditional C.警告传统C语中没有的功能。
-Wtraditional-conversionWarn of prototypes causing type conversions different from what would happen in the absence of prototype.对原型导致类型转换的警告与没有原型时可能发生的情况不同。
-WtrampolinesWarn whenever a trampoline is generated.请在生成蹦床时发出警告。
-WtrigraphsWarn if trigraphs are encountered that might affect the meaning of the program.如果遇到可能影响程序意义的触发,请发出警告。
-WtsanWarn about unsupported features in ThreadSanitizer.警告有关线程消毒器中不支持的功能。
-Wtype-limitsWarn if a comparison is always true or always false due to the limited range of the data type.如果由于数据类型的范围有限,比较总是为真或总是为假,请发出警告。
-Wundeclared-selectorWarn about @selector()s without previously declared methods.警告关于没有以前声明的方法的@选择器()。
-WundefWarn if an undefined macro is used in an #if directive.如果在#if指令中使用了未定义的宏,请发出警告。
-Wundefined-do-loopWarn about an invalid DO loop.警告关于一个无效的DO循环。
-WunderflowWarn about underflow of numerical constant expressions.警告数值常数表达式的欠流。
-WuninitializedWarn about uninitialized automatic variables.警告有关未初始化的自动变量。
-Wunknown-pragmasWarn about unrecognized pragmas.警告未被认可的语用。
-Wunreachable-codeDoes nothing. Preserved for backward compatibility.什么也不做。保留了向后兼容性。
-Wunsafe-loop-optimizationsDoes nothing. Preserved for backward compatibility.什么也不做。保留了向后兼容性。
-Wunsuffixed-float-constantsWarn about unsuffixed float constants.警告有关未带后缀的浮动常数。
-WunusedEnable all -Wunused- warnings.启用所有wunused警告。
-Wunused-but-set-parameterWarn when a function parameter is only set, otherwise unused.仅设置函数参数时发出警告,否则未使用。
-Wunused-but-set-variableWarn when a variable is only set, otherwise unused.当仅设置变量时发出警告,否则未使用。
-Wunused-const-variableWarn 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-argumentWarn about unused dummy arguments.警告有关未使用的虚拟参数。
-Wunused-functionWarn when a function is unused.当一个函数未使用时,请发出警告。
-Wunused-labelWarn when a label is unused.当标签未使用时,请发出警告。
-Wunused-local-typedefsWarn when typedefs locally defined in a function are not used.当未使用函数中本地定义的类型定义时发出警告。
-Wunused-macrosWarn about macros defined in the main file that are not used.警告在主文件中定义的未使用的宏。
-Wunused-parameterWarn when a function parameter is unused.当函数参数未使用时,请发出警告。
-Wunused-resultWarn if a caller of a function, marked with attribute warn_unused_result, does not use its return value.如果用属性警告_未使用的_结果标记的函数的调用者没有使用其返回值,则会发出警告。
-Wunused-valueWarn when an expression value is unused.当表达式值未使用时,请发出警告。
-Wunused-variableWarn when a variable is unused.当变量未使用时,请发出警告。
-Wuse-without-onlyWarn about USE statements that have no ONLY qualifier.警告关于没有唯一限定符的USE语句。
-Wuseless-castWarn about useless casts.警告无用的演员。
-WvarargsWarn about questionable usage of the macros used to retrieve variable arguments.警告有关用于检索变量参数的宏的使用有问题。
-Wvariadic-macrosWarn about using variadic macros.警告不要使用可变的宏。
-Wvector-operation-performanceWarn when a vector operation is compiled outside the SIMD.当在SIMD之外编译向量操作时,请发出警告。
-Wvexing-parseWarn about the most vexing parse syntactic ambiguity.警告最令人烦恼的解析语法歧义。
-Wvirtual-inheritanceWarn on direct virtual inheritance.警告直接虚拟继承。
-Wvirtual-move-assignWarn if a virtual base has a non-trivial move assignment operator.如果虚拟基础具有重要的移动分配操作符,请发出警告。
-WvlaWarn 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-parameterWarn about mismatched declarations of VLA parameters.警告有关VLA参数的声明不匹配。
-WvolatileWarn about deprecated uses of volatile qualifier.警告,不要不建议使用不稳定的限定符。
-Wvolatile-register-varWarn when a register variable is declared volatile.当寄存器变量声明为不稳定时发出警告。
-Wwrite-stringsIn 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-constantWarn when a literal ‘0’ is used as null pointer.当将文字“0”用作空指针时,会发出警告。
-Wzero-length-boundsWarn about accesses to interior zero-length array members.警告不要访问内部零长度数组成员。
-WzerotripWarn about zero-trip DO loops.警告关于零行程的DO循环。
-frequire-return-statementFunctions 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

  • 25
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值