C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

20 TNS C Compiler Messages
This chapter presents the error and warning messages that can occur during the compilation of a
C program using the TNS C compiler.
Types of Compiler Messages
The TNS C compiler scans the source code line by line and notifies you of an error or potential
error by issuing an error or warning message:
An error message indicates an error that you must correct before C can successfully compile
the source code.
A warning message indicates a potential error condition and an area of the source code that
you should check.
When it issues a message, the compiler displays:
Either ERROR or WARNING to indicate the type of message
The message number
The text of the message
In addition, the compiler displays the line number of the source line that caused the message and,
in the case of include files, the file name.
1
invalid preprocessor command
Cause
The preprocessor encountered an unrecognized element that was not a valid preprocessor token.
For example, the C compiler generates this error if it encounters a # (number sign) character at
the start of an input line and this text is not a preprocessor directive.
2
unexpected end of file
Cause
The compiler encountered the end of an input file when it expected more data. This error can
occur on an included file or the original source file. In many cases, correction of a previous error
will eliminate this error.
3
file not found, file in use, security violation, or Guardian error =
"error-number"
Cause
The compiler did not find the file with the name specified on an #include directive.
4
invalid lexical token
Cause
The compiler encountered an unrecognized element that was not a valid lexical construct (such
as an identifier or one of the valid expression operators). This error can occur if the compiler
detected control characters or other illegal characters in the source file. This error can also occur
if you specified a preprocessor directive with the number sign not in the first position of an input
line.
Types of Compiler Messages 329