《常见编译错误解析.ppt》由会员分享,可在线阅读,更多相关《常见编译错误解析.ppt(13页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、常见编译器错误提示(一)Ambiguous operators need parentheses-Ambiguous operators need parentheses-不明确的运算需要用括号括起不明确的运算需要用括号括起Ambiguous symbol xxx-Ambiguous symbol xxx-不明确的符号不明确的符号Argument list syntax error-Argument list syntax error-参数表语法错误参数表语法错误Array bounds missing-Array bounds missing-丢失数组界限符丢失数组界限符Array size
2、 toolarge-Array size toolarge-数组尺寸太大数组尺寸太大Bad character in paramenters-Bad character in paramenters-参数中有不适当的字符参数中有不适当的字符Bad file name format in include directive-Bad file name format in include directive-包含命令中文件名格式不正确包含命令中文件名格式不正确Bad ifdef directive synatax-Bad ifdef directive synatax-编译预处理编译预处理ifde
3、fifdef有语法错有语法错Bad undef directive syntax-Bad undef directive syntax-编译预处理编译预处理undefundef有语法错有语法错Bit field too large-Bit field too large-位字段太长位字段太长常见编译器错误提示(二)Call of non-function-Call of non-function-调用未定义的函数调用未定义的函数Call to function with no prototype-Call to function with no prototype-调用函数时没有函数的说明调用
4、函数时没有函数的说明Cannot modify a const object-Cannot modify a const object-不允许修改常量对象不允许修改常量对象Case outside of switch-Case outside of switch-漏掉了漏掉了case case 语句语句Case syntax error-Case Case syntax error-Case 语法错误语法错误Code has no effect-Code has no effect-代码不可述不可能执行到代码不可述不可能执行到Compound statement missing-Compoun
5、d statement missing-分程序漏掉分程序漏掉“Conflicting type modifiers-Conflicting type modifiers-不明确的类型说明符不明确的类型说明符Constant expression required-Constant expression required-要求常量表达式要求常量表达式Constant out of range in comparison-Constant out of range in comparison-在比较中常量超出范围在比较中常量超出范围常见编译器错误提示(三)Conversion may lose s
6、ignificant digits-Conversion may lose significant digits-转换时会丢失意义的数字转换时会丢失意义的数字Conversion of near pointer not allowed-Conversion of near pointer not allowed-不允许转换近指针不允许转换近指针Could not find file xxx-Could not find file xxx-找不到找不到XXXXXX文件文件Declaration missing;-Declaration missing;-说明缺少说明缺少;“Declaration
7、 syntax error-Declaration syntax error-说明中出现语法错误说明中出现语法错误Default outside of switch-Default Default outside of switch-Default 出现在出现在switchswitch语句之外语句之外Define directive needs an identifier-Define directive needs an identifier-定义编译预处理需要标识符定义编译预处理需要标识符Division by zero-Division by zero-用零作除数用零作除数Do stat
8、ement must have while-Do-whileDo statement must have while-Do-while语句中缺少语句中缺少whilewhile部分部分Enum syntax error-Enum syntax error-枚举类型语法错误枚举类型语法错误常见编译器错误提示(四)Enumeration constant syntax error-Enumeration constant syntax error-枚举常数语法错误枚举常数语法错误Error directive:xxx-Error directive:xxx-错误的编译预处理命令错误的编译预处理命令E
9、rror writing output file-Error writing output file-写输出文件错误写输出文件错误Expression syntax error-Expression syntax error-表达式语法错误表达式语法错误Extra parameter in call-Extra parameter in call-调用时出现多余错误调用时出现多余错误File name too long-File name too long-文件名太长文件名太长Function call missing -Function call missing -函数调用缺少右括号函数调用
10、缺少右括号Fuction definition out of place-Fuction definition out of place-函数定义位置错误函数定义位置错误Fuction should return a value-Fuction should return a value-函数必需返回一个值函数必需返回一个值Goto statement missing label-GotoGoto statement missing label-Goto语句没有标号语句没有标号常见编译器错误提示(五)Hexadecimal or octal constant too large-16Hexad
11、ecimal or octal constant too large-16进制或进制或8 8进制常数太大进制常数太大Illegal character x-Illegal character x-非法字符非法字符x xIllegal initialization-Illegal initialization-非法的初始化非法的初始化Illegal octal digit-Illegal octal digit-非法的非法的8 8进制数字进制数字Illegal pointer subtraction-Illegal pointer subtraction-非法的指针相减非法的指针相减Illega
12、l structure operation-Illegal structure operation-非法的结构体操作非法的结构体操作Illegal use of floating point-Illegal use of floating point-非法的浮点运算非法的浮点运算Illegal use of pointer-Illegal use of pointer-指针使用非法指针使用非法Improper use of a typedefsymbol-Improper use of a typedefsymbol-类型定义符号使用不恰当类型定义符号使用不恰当In-line assembly
13、 not allowed-In-line assembly not allowed-不允许使用行间汇编不允许使用行间汇编常见编译器错误提示(六)Incompatible storage class-Incompatible storage class-存储类别不相容存储类别不相容Incompatible type conversion-Incompatible type conversion-不相容的类型转换不相容的类型转换Incorrect number format-Incorrect number format-错误的数据格式错误的数据格式Incorrect use of default
14、-DefaultIncorrect use of default-Default使用不当使用不当Invalid indirection-Invalid indirection-无效的间接运算无效的间接运算Invalid pointer addition-Invalid pointer addition-指针相加无效指针相加无效Irreducible expression tree-Irreducible expression tree-无法执行的表达式运算无法执行的表达式运算Lvalue required-Lvalue required-需要逻辑值需要逻辑值0 0或非或非0 0值值Macro
15、argument syntax error-Macro argument syntax error-宏参数语法错误宏参数语法错误Macro expansion too long-Macro expansion too long-宏的扩展以后太长宏的扩展以后太长常见编译器错误提示(七)Mismatched number of parameters in definition-Mismatched number of parameters in definition-定义中参数个数不匹定义中参数个数不匹配配Misplaced break-Misplaced break-此处不应出现此处不应出现br
16、eakbreak语句语句Misplaced continue-Misplaced continue-此处不应出现此处不应出现continuecontinue语句语句Misplaced decimal point-Misplaced decimal point-此处不应出现小数点此处不应出现小数点Misplaced elif directive-Misplaced elif directive-不应编译预处理不应编译预处理elifelifMisplaced else-Misplaced else-此处不应出现此处不应出现elseelseMisplaced else directive-Mispl
17、aced else directive-此处不应出现编译预处理此处不应出现编译预处理elseelseMisplaced endif directive-Misplaced endif directive-此处不应出现编译预处理此处不应出现编译预处理endifendifMust be addressable-Must be addressable-必须是可以编址的必须是可以编址的Must take address of memory location-Must take address of memory location-必须存储定位的地址必须存储定位的地址常见编译器错误提示(八)No dec
18、laration for function xxx-No declaration for function xxx-没有函数没有函数xxxxxx的说明的说明No stack-No stack-缺少堆栈缺少堆栈No type information-No type information-没有类型信息没有类型信息Non-portable pointer assignment-Non-portable pointer assignment-不可移动的指针(地址常数)赋值不可移动的指针(地址常数)赋值Non-portable pointer comparison-Non-portable point
19、er comparison-不可移动的指针(地址常数)比较不可移动的指针(地址常数)比较Non-portable pointer conversion-Non-portable pointer conversion-不可移动的指针(地址常数)转换不可移动的指针(地址常数)转换Not a valid expression format type-Not a valid expression format type-不合法的表达式格式不合法的表达式格式Not an allowed type-Not an allowed type-不允许使用的类型不允许使用的类型Numeric constant t
20、oo large-Numeric constant too large-数值常太大数值常太大Out of memory-Out of memory-内存不够用内存不够用常见编译器错误提示(九)Parameter xxx is never used-Parameter xxx is never used-能数能数xxxxxx没有用到没有用到Pointer required on left side of-Pointer required on left side of-符号符号-的左边必须是指针的左边必须是指针Possible use of xxx before definition-Possi
21、ble use of xxx before definition-在定义之前就使用了在定义之前就使用了xxxxxx(警告)(警告)Possibly incorrect assignment-Possibly incorrect assignment-赋值可能不正确赋值可能不正确Redeclaration of xxx-Redeclaration of xxx-重复定义了重复定义了xxxxxxRedefinition of xxx is not identical-xxxRedefinition of xxx is not identical-xxx的两次定义不一致的两次定义不一致Registe
22、r 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 missing;-Statement missing;-语句后缺少语句后缺少;常见编译器错误提示(十)Stru
23、cture 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-Superfluous&with function or array-函数或数组中有多余的函数或数组中有多余的&“
24、&“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 many default cases-Default太多太多(switch(switch语句中一个语句中
25、一个)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-函数用到的局部存储太多函数用到的局部存储太多Too much global data defined in file
26、-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 mismatch in redeclaration of xxx-xxx重定义的类型不匹配重定义的类型不匹配Unable
27、 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-无法打开输入文件无法打开输入文件xxxxxxUndefined label xxx-Undefined label xxx-没有定义的标
28、号没有定义的标号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 started on line xxx-从从xxxxxx行开始的注解尚未行开始的注解尚未结束文件不能结束结束文
29、件不能结束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 option-Unknown option-未知的操作未知的操作Unknown preprocessor di
30、rective:xxx-Unknown preprocessor directive:xxx-不认识的预处理命令不认识的预处理命令xxxxxxUnreachable code-Unreachable code-无路可达的代码无路可达的代码Unterminated string or character constant-Unterminated string or character constant-字符串缺少引号字符串缺少引号User break-User break-用户强行中断了程序用户强行中断了程序Void functions may not return a value-VoidV
31、oid 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 structure-xxx不是结构体的一部分不是结构体的一部分xxx statement missing(
32、-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-结构体的长度为零结构体的长度为零