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

#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, only the renumbering of lines takes place.
#line number [file-name]
#pragma
The #pragma directive instructs the preprocessor to pass a compiler pragma on to the compiler.
#pragma compiler-pragma [ , compiler-pragma ]... newline
compiler-pragma
is any compiler pragma described in Chapter 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.
#undef identifier
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.
Example
To delete the macro definition with identifier red and print “Red is undefined.”:
#define red 1
/* ... */
#undef red
#ifdef red
printf("Red is defined.\n");
#else
printf("Red is undefined.\n");
#endif
Predefined Macros
The compiler provides six predefined object-like macros. These macros expand to various statistics
regarding compilation, as shown in Table 26. Note that the identifiers for these macros begin and
end with two underscores.
160 Preprocessor Directives and Macros