C/C++ Programmer's Guide (G06.25+)
Preprocessor Directives and Macros
HP C/C++ Programmer’s Guide for NonStop Servers—429301-002
12-10
#line
#line
The #line directive causes the compiler to renumber the lines of the source text so
that the next line has the specified number and causes the compiler to believe that the
current source file name is file-name. If file-name is not specified, then only the
renumbering of lines takes place.
#pragma
The #pragma directive instructs the preprocessor to pass a compiler pragma on to the
compiler.
compiler-pragma
is any compiler pragma described in Section 13, Compiler Pragmas.
newline
is the newline character that terminates the directive line.
Example
This example enables run-time error checking:
#pragma CHECK
#undef
The #undef directive deletes a macro definition created using #define.
identifier
is the name of the macro to delete.
Usage Guideline
Once you have deleted a macro definition, its identifier no longer exists as a macro
name. Consequently, the #ifdef and #ifndef directives will find the identifier to be
undefined.
#line number [file-name]
#pragma compiler-pragma [ , compiler-pragma ]... newline
#undef identifier