-Wpointer-arith 当在算术表达式中使用函数指针时给出警告 -Wpointer-sign 赋值时如指针符号不一致则给出警告 -Wpointer-to-int-cast 将一个指针转换为大小不同的整数时给出警告 -Wpragmas 对错误使用的 pragma 加以警告 -Wproperty-assign-default Warn if a property for an O
-Warray-temporaries 创建临时数组时给出警告 -Wassign-intercept 当 Objective-C赋值可能为垃圾回收所介入时给出警告 -Wattributes 当对属性的使用不合适时给出警告 -Wbad-function-cast 当把函数转换为不兼容类型时给出警告 -Wbuiltin-macro-redefined 当内建预处理宏未定义或重定义时给出警告 ...
-Wimplicit-int 当声明未指定类型时给出警告 -Wimplicit-interface 对带有隐式接口的调用给出警告 -Wimplicit-procedure 对没有隐式声明的过程调用给出警告 -Winit-self 对初始化为自身的变量给出警告。 -Winline 当内联函数无法被内联时给出警告 -Wint-to-pointer-cast 当将一个大小不同的整数转换为指针时给...
]] Generate hardware workaround for specified problem --enable_restrict Enable the restrict keyword --endian { little|l|big|b} Select byte order, little-endian is default --enum_is_int Force the size of all enumeration types to be at least 4 bytes --error_limit limit Stop after this ...
-Wdangling-pointer=2 -Wdelete-non-virtual-dtor (C++ and Objective-C++ only) -Wduplicate-decl-specifier (C and Objective-C only) -Wenum-compare (in C/ObjC; this is on by default in C++) -Wenum-int-mismatch (C and Objective-C only) ...
-Wno-int-conversion -Wno-int-to-pointer-cast -Wno-invalid-offsetof -Wno-multichar -Wnonnull -Wno-return-local-addr -Wno-unused-result -Wno-virtual-move-assign -Wnon-virtual-dtor -Woverlength-strings -Woverloaded-virtual -Wpadded -Wparantheses ...
int a[2][2] = { 0, 1, 2, 3 }; int b[2][2] = { { 0, 1 }, { 2, 3 } }; -Wparentheses 括号不匹配,在运算符操作或if分支语句中,可能会出现此警告。 如“a&&b||c^d”会出现警告。下面代码片段也会有警告 { if (a)
如: #include int main (void) printf (Hello Wor 15、ld!/n); /* 错误的封装 */ return 0; 多字符组成的是字符串,应用双引号封装。对上例,应改写成: Hello World!。 6 warning: initialization makes integer from pointer without a cast 中文含义:警告:初始化过程中不能从指针到整型数进行转换 错误...
-O 还会在机器上打开 -fomit-frame-pointer ,这样做不会干扰调试。 -O2 进一步优化。GCC 执行几乎所有支持的不涉及空间速度权衡的优化。 当指定 -O2 时,编译器不会执行循环展开或函数内联。 与-O 相比,此选项增加了编译时间和生成代码的性能。-O2 打开-O 指定的所有优化标志。 它还打开以下优化标志: ...
-Werror选项: -Werror= ** 选项: - Wno-error= **选项: - Wchar-subscripts 选项: - Wfatal-errors 选项: -Wreturn-type 选项: -Wunused选项: -Wuninitialized 选项: Wsign-compare 选项: -Wall 选项: -Wextra选项(原为-W, 已经弃用了):