Errors and Warnings
Syntax and semantic errors typically occur in the source program. They identify actual programming errors. When an error is encountered, the compiler attempts to recover from the error and continue processing the source file. As more errors are encountered, the compiler outputs additional error messages. No object file is produced once an error is encountered.
Warnings produce information about potential problems which may occur during program execution. Warnings do not hinder compilation of the source file.
Errors and warnings are formatted as follows:
*** ERROR number IN LINE line OF file: message
*** WARNING number IN LINE line OF file: message
Where
| number | is the error number. |
| line | is the line number where the error was detected. |
| file | is the source or include file in which the error was detected. |
| message | is a brief description of the error or warning. |
The error or warning message may include the following terms:
| Term | Description |
|---|
| character | Specifies a character. |
| class | Specifies the stored class of an object. |
| file-name | Specifies the name of a file on disk. |
| function-name | Specifies the name of a function in your program. |
| identifier | Specifies a user-defined name for a program object (function, variable, label, and so on). |
| L-Value | Specifies the location value of the variable. L-Values may be read-from or written-to. |
| macro-name | Specifies the name of a macro. |
| memory-space | Specifies the memory space where an object is located. |
| message | Specifies a content-specific error or warning message. |
| number | Specifies a number appropriate to the error or warning message. |
| operator | Specifies the operator used. |
| R-Value | Specifies the data value of the variable. The "R" may be thought of as "read" value. R-Values may be read-from but may not be written-to. |
| range | Specifies a range of values. |
| tag-name | Specifies the name of a struct, union, or enum. |
| token | Specifies a C language token or keyword. |
| type | Specifies the memory type used. |
Errors and warnings are listed in numerical order and are divided into several sections:
| Summary | Briefly describes the error or warning. |
| Description | Provides a detailed description of message and why it was generated. |
| Cause | Describes the cause of the error. |
| Resolution | Provides hints and suggestions for correcting the problem. |
| Example | Provides an example, where possible, of the error condition. |
| See Also | Provides useful references to additional material. |