C/C++ Programmer's Guide (G06.25+)

HP C/C++ Programmer’s Guide for NonStop Systems429301-008
20-1
20 TNS C Compiler Messages
This section 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
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 the following text is not a
preprocessor directive.
2
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
The compiler did not find the file with the name specified on an #include directive.
invalid preprocessor command
unexpected end of file
file not found, file in use, security violation, or Guardian
error = "error-number"