-Wvolatile-register-var -Wzero-length-bounds -Wextra extra检测项是all的补充,启用了all未启用的一些额外警告标志。包括一些不是那么常用的检测项,具体如下: -Wabsolute-value (only for C/ObjC) -Walloc-size -Wcalloc-transposed-args -Wcast-function-type -Wclobbered -Wdangling-reference (C++ only) ...
gcc gives "array subscript is above array bounds [-Werror=array-bounds]" when using optimization option -03 Solution Unverified - Updated August 5 2024 at 7:54 AM - English Issue When I compile the a module using optimization level 2 it success, however when I do this same code with opt...
附加警告的说明符; 例如-Werror =开关将由-Wswitch控制的警告转换为错误。 此开关采用否定形式,用于否定-针对特定警告的错误; 例如-Wno-error =开关使得-wswitch警告不是错误,即使在-Werror有效时也是如此。 每个可控警告的警告消息都包含控制警告的选项。 那么该选项可以与-Werror =和-Wno-error =一起使用 ,...
-Wmissing-braces 若初始值设定项中可能缺少花括号则给出警告 -Wmissing-declarations 当全局函数没有前向声明时给出警告 -Wmissing-field-initializers 若结构初始值设定项中缺少字段则给出警告 -Wmissing-format-attribute 当函数可能是 format 属性的备选时给出警告 -Wmissing-include-dirs 当用户给定的包含目录不...
-Warray-bounds=1 数组越界检查,需启用选项-ftree-vrp 完整的列表参见链接Warning-Options。 当需要排除某些类型的警告时,记得使用-Wno-xxx, 比如使用-Wall -Wno-unused-variable可以从-Wall中排除-Wunused-variable。 2 -Wextra 单单只有-Wall可能还不够严格,GCC还有-Wextra作为补充,包括另外一些没有被-Wall包含...
-Warray-bounds=1 (only with -O2) -Wc++11-compat -Wc++14-compat -Wchar-subscripts -Wenum-compare (in C/ObjC; this is on by default in C++) -Wimplicit-int (C and ObjecTIve-C only) -Wimplicit-funcTIon-declaraTIon (C and ObjecTIve-C only) ...
-Waggregate-return 当返回结构、联合或数组时给出警告 -Waliasing 为可能的虚参重叠给出警告 -Walign-commons 对 COMMON 块对齐的警告 -Wall 启用大部分警告信息 -Wampersand 若延续字符常量中缺少 & 则给出警告 -Warray-bounds 当数组访问越界时给出警告 ...
-Waddress -Warray-bounds (only with -O2) -Wc++0x-compat -Wchar-subscripts -Wimplicit-int -Wimplicit-function-declaration -Wcomment -Wformat -Wmain (only for C/ObjC and unless -ffreestanding) -Wmissing-braces -Wnonnull -Wparentheses ...
-Waggregate-return 当返回结构、联合或数组时给出警告 -Waliasing 为可能的虚参重叠给出警告 -Walign-commons 对 COMMON 块对齐的警告 -Wall 启用大部分警告信息 -Wampersand 若延续字符常量中缺少 & 则给出警告 -Warray-bounds 当数组访问越界时给出警告 ...
KBUILD_CFLAGS += $(stackp-flags-y) KBUILD_CFLAGS-$(CONFIG_WERROR) += -Werror KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds KBUILD_CFLAGS += $(KBUILD_CFLAGS-y) $(CONFIG_CC_IMPLICIT_FALLTHROUGH) ifdef CONFIG_CC_IS_CLANG1...