《最新常见编译错误解析PPT课件.ppt》由会员分享,可在线阅读,更多相关《最新常见编译错误解析PPT课件.ppt(14页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、常见编译错误解析常见编译错误解析常见编译器错误提示(二)Call of non-function-Call of non-function-调用未定义的函数调用未定义的函数Call to function with no prototype-Call to function with no prototype-调用函数时没有函数的说明调用函数时没有函数的说明Cannot modify a const object-Cannot modify a const object-不允许修改常量对象不允许修改常量对象Case outside of switch-Case outside of switc
2、h-漏掉了漏掉了case case 语句语句Case syntax error-Case Case syntax error-Case 语法错误语法错误Code has no effect-Code has no effect-代码不可述不可能执行到代码不可述不可能执行到Compound statement missing-Compound statement missing-分程序漏掉分程序漏掉“Conflicting type modifiers-Conflicting type modifiers-不明确的类型说明符不明确的类型说明符Constant expression require
3、d-Constant expression required-要求常量表达式要求常量表达式Constant out of range in comparison-Constant out of range in comparison-在比较中常量超出范围在比较中常量超出范围常见编译器错误提示(九)Parameter xxx is never used-Parameter xxx is never used-能数能数xxxxxx没有用到没有用到Pointer required on left side of-Pointer required on left side of-符号符号-的左边必须是
4、指针的左边必须是指针Possible use of xxx before definition-Possible use of xxx before definition-在定义之前就使用了在定义之前就使用了xxxxxx(警告)(警告)Possibly incorrect assignment-Possibly incorrect assignment-赋值可能不正确赋值可能不正确Redeclaration of xxx-Redeclaration of xxx-重复定义了重复定义了xxxxxxRedefinition of xxx is not identical-xxxRedefiniti
5、on of xxx is not identical-xxx的两次定义不一致的两次定义不一致Register allocation failure-Register allocation failure-寄存器定址失败寄存器定址失败Repeat count needs an lvalue-Repeat count needs an lvalue-重复计数需要逻辑值重复计数需要逻辑值Size of structure or array not known-Size of structure or array not known-结构体或数给大小不确定结构体或数给大小不确定Statement mi
6、ssing;-Statement missing;-语句后缺少语句后缺少;常见编译器错误提示(十)Structure or union syntax error-Structure or union syntax error-结构体或联合体语法错误结构体或联合体语法错误Structure size too large-Structure size too large-结构体尺寸太大结构体尺寸太大Sub scripting missing -Sub scripting missing -下标缺少右方括号下标缺少右方括号Superfluous&with function or array-Supe
7、rfluous&with function or array-函数或数组中有多余的函数或数组中有多余的&“&“Suspicious pointer conversion-Suspicious pointer conversion-可疑的指针转换可疑的指针转换Symbol limit exceeded-Symbol limit exceeded-符号超限符号超限Too few parameters in call-Too few parameters in call-函数调用时的实参少于函数的参数不函数调用时的实参少于函数的参数不Too many default cases-DefaultToo
8、 many default cases-Default太多太多(switch(switch语句中一个语句中一个)Too many error or warning messages-Too many error or warning messages-错误或警告信息太多错误或警告信息太多Too many type in declaration-Too many type in declaration-说明中类型太多说明中类型太多常见编译器错误提示(十一)Too much auto memory in function-Too much auto memory in function-函数用到的
9、局部存储太多函数用到的局部存储太多Too much global data defined in file-Too much global data defined in file-文件中全局数据太多文件中全局数据太多Two consecutive dots-Two consecutive dots-两个连续的句点两个连续的句点Type mismatch in parameter xxx-Type mismatch in parameter xxx-参数参数xxxxxx类型不匹配类型不匹配Type mismatch in redeclaration of xxx-xxxType mismatc
10、h in redeclaration of xxx-xxx重定义的类型不匹配重定义的类型不匹配Unable to create output file xxx-Unable to create output file xxx-无法建立输出文件无法建立输出文件xxxxxxUnable to open include file xxx-Unable to open include file xxx-无法打开被包含的文件无法打开被包含的文件xxxxxxUnable to open input file xxx-Unable to open input file xxx-无法打开输入文件无法打开输入文
11、件xxxxxxUndefined label xxx-Undefined label xxx-没有定义的标号没有定义的标号xxxxxxUndefined structure xxx-Undefined structure xxx-没有定义的结构没有定义的结构xxxxxx常见编译器错误提示(十二)Undefined symbol xxx-Undefined symbol xxx-没有定义的符号没有定义的符号xxxxxxUnexpected end of file in comment started on line xxx-Unexpected end of file in comment st
12、arted on line xxx-从从xxxxxx行开始的注解尚未行开始的注解尚未结束文件不能结束结束文件不能结束Unexpected end of file in conditional started on line xxx-Unexpected end of file in conditional started on line xxx-从从xxx xxx 开始的条件语句尚未开始的条件语句尚未结束文件不能结束结束文件不能结束Unknown assemble instruction-Unknown assemble instruction-未知的汇编结构未知的汇编结构Unknown op
13、tion-Unknown option-未知的操作未知的操作Unknown preprocessor directive:xxx-Unknown preprocessor directive:xxx-不认识的预处理命令不认识的预处理命令xxxxxxUnreachable code-Unreachable code-无路可达的代码无路可达的代码Unterminated string or character constant-Unterminated string or character constant-字符串缺少引号字符串缺少引号User break-User break-用户强行中断了程
14、序用户强行中断了程序Void functions may not return a value-VoidVoid functions may not return a value-Void类型的函数不应有返回值类型的函数不应有返回值常见编译器错误提示(十三)Wrong number of arguments-Wrong number of arguments-调用函数的参数数目错调用函数的参数数目错xxx not an argument-xxxxxx not an argument-xxx不是参数不是参数xxx not part of structure-xxxxxx not part of
15、structure-xxx不是结构体的一部分不是结构体的一部分xxx statement missing(-xxxxxx statement missing(-xxx语句缺少左括号语句缺少左括号xxx statement missing)-xxxxxx statement missing)-xxx语句缺少右括号语句缺少右括号xxx statement missing;-xxxxxx statement missing;-xxx缺少分号缺少分号xxx declared but never used-xxx declared but never used-说明了说明了xxxxxx但没有使用但没有使用xxx is assigned a value which is never used-xxx is assigned a value which is never used-给给xxxxxx赋了赋了值但未用过值但未用过Zero length structure-Zero length structure-结构体的长度为零结构体的长度为零