A detailed introduction to compiling error messages based on Turbo C (V2.0) _c language

Source: Internet
Author: User
Tags case statement constant function definition function prototype goto modifier

Description: Turbo C's source program error is divided into three types: fatal error, general error, and warning. A fatal error is usually an internal compilation error, a general error that refers to a program's syntax error, a disk or memory access error, or a command-line error, and the warning simply points to a suspicious situation and does not prevent compilation.

  The following alphabetical a~z lists fatal errors and general error messages, in English-Chinese comparison and processing methods:

(i) Fatal errors English-Chinese control and treatment methods:

A-b Fatal Error

Bad Call of In-line function (illegal invocation of internal function)
Analysis and processing: When using a macro-defined intrinsic function, it is not invoked correctly. An intrinsic function begins and ends with a two underscore (__).

Irreducable expression tree (irreducible expression trees)
Analysis and Processing: This error refers to the complexity of the expression in the file row so that the code generator cannot generate code for it. This type of expression must be avoided.

Register allocation failure (memory allocation failure)
Analysis and processing: This error means that the expression in the file row is too complex to generate code for the Code generation program. At this point you should simplify this complex expression or simply avoid using it.

(b) General error information English-Chinese photo and processing methods

#operator not followed by Maco argument name (#运算符后没跟宏变元名)
Analysis and Processing: In the macro definition, #用于标识一宏变串. "#" must be followed by a macro variable name.

' xxxxxx ' not anargument (' xxxxxx ' is not a function argument)
Analysis and Processing: The identifier is defined as a function parameter in the source program, but this identifier does not appear in the function.

Ambiguous symbol ' xxxxxx ' (ambiguity sign ' xxxxxx ')
Analysis and processing: two or more of the structure of a domain name is the same, but with a different offset, type. When you refer to the field in a variable or expression without a structure name, a two semantics is generated, and you need to modify a domain name or add a structure name to the reference.

Argument # Missing name (parameter # name missing)
Analysis and Processing: The parameter name has been detached from the function prototype used to define the function. If the function is defined as a prototype, the function must contain all the parameter names. Argument list syntax error (parameter table syntax error)
Parsing and processing: The parameters of a function call must be separated by commas and end with a closing parenthesis. An error occurs if the source file contains a parameter that is not followed by a comma and is not a closing parenthesis.

Array bounds missing (the bounds of the array "]" is lost)
Analysis and Processing: An array is defined in the source file, but the array does not end with the following closing bracket.

Array size too large (array too large)
Analysis and processing: The defined array is too large to exceed the available memory space.

Assembler statement too long (Assembly statement too long)
Analysis and processing: The internal Assembly statement can not be longer than 480 bytes.

Bad configuration file (incorrect configuration file)
Analysis and Processing: The Turboc.cfg configuration file contains non-annotated text that is not the appropriate command-line selection. The profile command selection must start with a dash.

Bad file name format in include directive (incorrect filename format in include Directive)
Parsing and processing: the include file name must be enclosed in quotation marks ("filename.h") or angle brackets (<filename>), otherwise this class of error will occur. If you use a macro, the resulting extended text is incorrect, because there is no way to recognize it without quotes.

Bad ifdef directive Syntax (ifdef instruction syntax error)
Analysis and Processing: #ifdef必须以单个标识符 (only this one) as the body of the instruction.

Bad ifndef directive Syntax (ifndef instruction syntax error)
Analysis and Processing: #ifndef must be a single identifier (only one) as the body of the instruction.

Bad undef directive Syntax (undef instruction syntax error)
Analysis and Processing: #undef指令必须以单个标识符 (only this one) as the body of the instruction.

Bad file size syntax (bit section section syntax error)
Analysis and processing: a bit length must be a 1-16-bit constant expression.

Call of Non-functin (calling undefined function)
Analysis and Processing: The function being called is undefined, usually due to incorrect function declaration or misspelled function name.

Cannot modify a const object (cannot modify a long objects)
Analysis and Processing: This error is caused by illegal manipulation of an object defined as a constant (as usual).

Case outside of switch (case appears outside switch)
Analysis and Processing: The compiler discovers that the case statement appears outside the switch statement, which is usually caused by mismatched parentheses.

Case statement Missing (case statement omitted)
Analysis and processing: The case must contain a constant expression ending with a colon, and this type of error can occur if a colon is omitted or if more symbols are added before the colon.

Character constant too long (Word constants)
Analysis and Processing: the length of a character constants is usually only one or two characters long, and this error can occur when this length is exceeded.

Compound statement missing (missing compound statement)
Analysis and Processing: The compiler scans to the source file West, and no closing symbol (curly braces) is found, such failures are usually caused by mismatched braces.

Conflicting type modifiers (type modifier conflict)
Analysis and processing: For the same pointer, you can specify only one variable-address modifier (such as near or far), and for the same function, only one language modifier (such as cdecl, Pascal, or interrupt) can be given.

Constant expression Required (requires constant expression)
Parsing and processing: The size of the array must be constant, and this error is usually caused by a spelling error for the #define constant.

Could not find file ' xxxxxx.xxx ' (no ' xxxxxx.xx ' file found)
Analysis and processing: The compiler could not find the file given on the command line.

Declaration Missing (omitted description)
Analysis and processing: This type of error occurs when a struct or union domain declaration is included in the source file and a semicolon is omitted.

Declaration needs type or storage class (description must give a type or storage class)
Analysis and processing: The correct variable description must indicate the variable type, otherwise this type of error will occur.

Declaration syntax error (indicating a syntax error)
Analysis and processing: In a source file, this type of error can occur if a description loses some symbols or enters extra symbols.

Default outside of switch (default statement appears outside the switch statement)
Analysis and processing: This type of error is usually caused by mismatched parentheses.

Define directive needs an identifier (Define directive must have an identifier)
Analysis and processing: the first spaces after #define must be an identifier, which can cause such errors if there are other characters in that position.

Division by zero (divisor 0)
Analysis and processing: This type of error occurs when a constant expression of a source file has a zero divisor.

Do statement must have while (a while keyword must be in a Do statement)
Analysis and Processing: This error occurs if the source file contains a do statement with no while keyword.

Do While statement missing (() missing symbol in Do While statement ()
Analysis and processing: In a Do statement, this error occurs if there is no opening parenthesis after the while keyword. Do While statement missing (semicolon dropped in Do while statement)
Analysis and processing: In a conditional expression of a Do statement, such an error occurs if there is no semicolon following the closing parenthesis.

Duplicate cases (case not unique)
Analysis and Processing: Each case of a switch statement must have a unique constant expression value. Otherwise, this type of error occurs.

Enum syntax error (enum syntax errors)
Analysis and processing: This type of error can occur if the identifier table format for the enum description is not correct.

Enumeration constant syntax error (enum constant syntax error)
Analysis and processing: This type of error can occur if the value of an expression that is assigned to an enum type variable is not a constant.

Error directive:xxxx (Error directive: XXXX)
Analysis and Processing: When the source file processes the #error instruction, it displays the information indicated by the directive.

Error writing output file (incorrect write output files)
Analysis and processing: This type of error is usually caused by a full disk space that cannot be written.

Expression syntax error (expression syntax errors)
Analysis and Processing: This error is usually due to the occurrence of two consecutive operators, the brackets do not match or missing parentheses, the previous statement omitted the semicolon caused.

Extra parameter in call (extra arguments appear when called)
Analysis and Processing: This error is due to the fact that the number of actual arguments is more than the number of parameters in the function definition when calling a function.

Extra parameter in calls to XXXXXX (extra arguments occurred while invoking the XXXXXXXX function)

File name too long (filename is too long)
Analysis and processing: #include指令给出的文件名太长, causing the compiler to be unable to process, this type of error occurs. Typically, DOS filenames cannot be longer than 64 characters in length.

For statement missing) (in the for language name is missing ")")
Analysis and processing: In a For statement, this type of error can occur if the closing parenthesis is missing after the control of the expression.

For statement missing (the For statement lacks "(")

For statement missing; (For statement missing ";")
Analysis and processing: In a For statement, this type of error occurs when a semicolon is missing from an expression.

function call missing) (absence of ")" for functional invocation)
Analysis and processing: This type of error can occur if the parameter table of the function call misses the right parenthesis or bracket mismatch.

function definition out ofplace (functional definition location error)

function doesn ' t take a variable number of argument (functions do not accept variable parameters)

Goto statement Missing label (Goto statement Missing label)

If statement missing (if statement missing "(")

If statement missing) (if statement missing ")")

Lllegal initalization (Illegal initialization)

Lllegal octal Digit (number of illegal octal)
Analysis and processing: This type of error is usually caused by a octal number contained in the octal constant.

Lllegal pointer Subtraction (subtraction of illegal pointers)

Lllegal structure operation (illegal structure operation)

Lllegal use of floating point (illegal floating-point operation)

Lllegal use of pointer (illegal pointer usage)

Improper use of a TypeDef symbol (misuse of the typedef symbol)

Incompatible storage class (incompatible storage type)

Incompatible type conversion (incompatible conversion of types)

Incorrect COMMADN line argument:xxxxxx (incorrect command-line arguments: xxxxxxx)

Incorrect COMMADN file argument:xxxxxx (Incorrect profile parameters: xxxxxxx)

Incorrect number format (incorrect data format)

Incorrect use of default (Deflult not used correctly)

initializer syntax error (initialization syntax errors)

Invaild indrection (Invalid indirect operation)

INVALID macro Argument separator (invalid macro parameter separator)

Invalid pointer Addition (addition of invalid pointers)

Invalid use of dot (wrong point)

Macro argument syntax error (macro parameter syntax error)

Macro expansion too long (macro extension too)

Mismatch number of parameters in definition (no match for parameter numbers in definition)

Misplaced break (bad break position)

Misplaced continue (wrong location)

Misplaced decimal point (decimal place is wrong)

Misplaced else (else location is wrong)

Misplaced else driective (clse command location error)

Misplaced endif directive (endif command location error)

Must be addressable (must be addressable)

Must take address of memory location (must be a memory one)

No file name ending (no files terminator)

No file names given (no filename is given)

Non-protable pointer assignment (assigning values to non-portable pointers)

Non-protable pointer Comparison (non-portable pointer comparison)

Non-protable return type conversion (non-portable conversion of returned types)

Not a allowed type (disallowed)

Out of memory (not enough memory)

Pointer required on left side of (the operator must be a pointer to the left-hand side)

Redeclaration of ' xxxxxx ' (' xxxxxx ' redefined)

Size of structure or array not known (indeterminate structure or array size)

Statement missing (statement missing ";")

Structure or Union syntax error (struct or union syntax errors)

Structure size too large (too much structure)

Subscription missing] (subscript missing '] ')

Switch statement Missing (the switch statement lacks "(")

Switch statement missing) (the switch statement is missing ")")

Too few parameters in call (too few function invocation parameters)

Too few parameter in calls to ' xxxxxx ' (too few arguments when calling ' xxxxxx ')

Too many cases (too many cases)

Too many decimal points (too many decimal points)

Too Many default cases (too many defaut)

Too many exponents (too many order codes)

Too many initializers (too much initialization)

Too many storage classes in declaration (description too many storage classes)

Too many types in decleration (too many types in the description)

Too much auto memory in function (too many auto stores in functions)

Too much of global define in file (too many global data defined in files)

Two consecutive dots (two consecutive dots)

Type mismatch in Parameter # (parameter ' # ' type does not match)

Type mismatch in parameter # in calls to ' XXXXXXX ' (parameter # Type mismatch when calling ' XXXXXXX ')

Type Missmatch in Parameter ' XXXXXXX ' (argument ' XXXXXXX ' type does not match)

Type mismatch in parameter ' yyyyyyyy ' "yyyyyyyy ' (call ' yyyyyyy ' when parameter ' XXXXXXXX ' number mismatch)

Type mismatch in redeclaration of ' XXX ' (redefine type mismatch)

Unable to creat output file ' XXXXXXXX. XXX ' (Cannot create output file ' XXXXXXXX. XXX ')

Unable to create TURBOC.LNK (Cannot create Turboc.lnk)

Unable to execute command ' xxxxxxxx ' (Cannot execute ' xxxxxxxx ' commands)

Unable to open include file ' xxxxxxx.xxx ' (unable to open include ' xxxxxxxx.xxx ')

Unable to open inputfile ' xxxxxxx.xxx ' (Cannot open input file ' xxxxxxxx.xxx ')

Undefined label ' xxxxxxx ' (label ' xxxxxxx ' Not defined)

Undefined structure ' xxxxxxxxx ' (structure ' xxxxxxxxxx ' undefined)

Undefined symbol ' xxxxxxx ' (symbol ' xxxxxxxx ' not defined)

Unexpected end of file in comment started on line # (source file unexpectedly ends in a comment)

Unexpected end of file in conditional stated on line # (the source file ends unexpectedly in the conditional statement at the start of the # Row)

Unknown preprocessor directive ' xxx ' (not recognized preprocessing directive: ' xxx ') untermimated character constant (amount of Word constants not terminated)

Unterminated string (no end string)

Unterminated string or character constant (number of not-terminated strings or Word constants)

User break (Users interrupt)

Value required (Assignment request)

While statement missing (the while statement misses ' (')

While statement missing) (while statement omitted ') ')

Wrong number of arguments in ' xxxxxxxx ' (call ' xxxxxxxx ' with incorrect parameters)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.