-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) ...
/usr/bin/gcc -c -m32 -ansi -D_GNU_SOURCE \ -funsigned-char -fno-zero-initialized-in-bss -fno-strict-aliasing \ -DLANGUAGE_C -Wall -Wno-strict-aliasing -Wextra -Werror \ -O2 \ -pipe -Wstrict-prototypes -Wmissing-prototypes test_code.c ...
附加警告的说明符; 例如-Werror =开关将由-Wswitch控制的警告转换为错误。 此开关采用否定形式,用于否定-针对特定警告的错误; 例如-Wno-error =开关使得-wswitch警告不是错误,即使在-Werror有效时也是如此。 每个可控警告的警告消息都包含控制警告的选项。 那么该选项可以与-Werror =和-Wno-error =一起使用 ,...
-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) ...
As a workaround, add-Wno-error=unused-but-set-variableor-Wno-error=unused-but-set-parameter. -Werror Make all warnings into errors -Wall -Wallturns on the following warning flags: --Waddress -Warray-bounds (only with -O2) -Wc++11-compat ...
-Walign-commons 对 COMMON 块对齐的警告 -Wall 启用大部分警告信息 -Wampersand 若延续字符常量中缺少 & 则给出警告 -Warray-bounds 当数组访问越界时给出警告 -Warray-temporaries 创建临时数组时给出警告 -Wassign-intercept 当 Objective-C赋值可能为垃圾回收所介入时给出警告 ...
-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 ...
-Werror Make all warnings into errors -Wall -Wall turns on the following warning flags: --Waddress -Warray-bounds (only with -O2) -Wc++11-compat -Wchar-subscripts -Wenum-compare (in C/ObjC; this is on by default in C++) -Wimplicit-int (C and Objec...
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...