gcc 常见的编译警告与错误(按字母顺序排列)备课讲稿

精品文档

\\/*\\ within comment “/*出现在注释中

\\\\x used with no following hex digits \\\\x 后没有 16 进制数字

\\defined\\ cannot be used as a macro name “defined不能被用作宏名

__COUNTER__ expanded inside directive with -fdirectives-only 带 -fdirectives-only 时 __COUNTER__ 在指示中扩展

__VA_ARGS__ can only appear in the expansion of a C99 variadic macro __VA_ARGS__ 只能出现在 C99 可变参数宏的展开中

_Pragma takes a parenthesized string literal _Pragma 需要一个括起的字符串字面常量

‘%.*s’ is not in NFC ‘%.*s’不在 NFC 中

‘%.*s’ is not in NFKC ‘%.*s’不在 NFKC 中

‘##’ cannot appear at either end of a macro expansion ‘##’不能出现在宏展开的两端

‘#’ is not followed by a macro parameter ‘#’后没有宏参数

收集于网络,如有侵权请联系管理员删除

精品文档

‘$’ in identifier or number ‘$’出现在标识符或数字中

‘:’ without preceding ‘?’ ‘:’前没有‘?’

‘?’ without following ‘:’ ‘?’后没有‘:’

'return' with a value, in function returning void 在void返回类型的函数中,return返回值。

\protocol_type重定义

anonymous variadic macros were introduced in C99 匿名可变参数宏在 C99 中被引入

assertion without predicate 断言后没有谓词

assertions are a deprecated extension 断言是一个已过时的 GCC 扩展

assertions are a GCC extension 断言是一个 GCC 扩展

assignment discards qualifiers from pointer target type 赋值时,取消了右值的限定。

收集于网络,如有侵权请联系管理员删除

精品文档

assignment from incompatible pointer type 不兼容的指针间赋值

attempt to use poisoned \\%s\\ 试图使用有毒的“%s”

backslash and newline separated by space 反斜杠和换行为空格所分隔

backslash-newline at end of file 反斜杠续行出现在文件末尾

binary constants are a GCC extension 二进制常量是一个 GCC 扩展

C++ style comments are not allowed in ISO C90 C++ 风格的注释在 ISO C90 中不被允许

cannot find source file %s 找不到源文件 %s

Character %x might not be NFKC 字符 %x 可能不是 NFKC

character 0x%lx is not in the basic source character set\\n 字符 0x%lx 不在基本源字符集中\\n

character 0x%lx is not unibyte in execution character set 字符 0x%lx 在执行字符集中不是单字节的

character constant too long for its type 字符常量大小超出其类型

收集于网络,如有侵权请联系管理员删除

精品文档

comma operator in operand of #if #if 操作数中出现逗号

comparison between pointer and integer integer与pointer比较

comparison is always false due to limited range of data type 由于数据类型范围的限制,比较结果一直为假

comparison is always true due to limited range of data type 由于数据类型范围的限制,比较结果一直为真。

conversion from %s to %s not supported by iconv iconv 不支持从 %s 到 %s 的转换

converting escape sequence to execution character set 将转义序列转换到执行字符集

converting to execution character set 转换到可执行文件的字符集

converting UCN to execution character set 将 UCN 转换到执行字符集

converting UCN to source character set 将 UCN 转换到源字符集

could not determine date and time 无法决定日期与时间

could not determine file timestamp 无法决定文件的时间戳

收集于网络,如有侵权请联系管理员删除

精品文档

CPP arithmetic must be at least as precise as a target int CPP 算术必须至少具有目标 int 的精度

CPP half-integer narrower than CPP character CPP 半整数短于 CPP 字符

CPP on this host cannot handle wide character constants over %lu bits, but the target requires %lu bits

在此宿主机上,CPP 不能处理长于 %lu 位的宽字符常量,但目标需要 %lu 位

cppchar_t must be an unsigned type cppchar_t 必须是无符号型

current file is older than %s 当前文件早于 %s

decimal float constants are a GCC extension 十进制浮点常量是一个 GCC 扩展

detected recursion whilst expanding macro \\%s\\ 展开宏%s时检测到递归

division by zero in #if #if 中用零做除数

duplicate macro parameter \\%s\\ 重复的宏参数“%s”

embedding a directive within macro arguments is not portable 将一个指示嵌入宏参数中是不可移植的

empty character constant 空的字符常量

收集于网络,如有侵权请联系管理员删除

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4