Preprocessor - cppreference.com (original) (raw)

The preprocessor is executed at translation phase 4, before the compilation. The result of preprocessing is a single file which is then passed to the actual compiler.

[edit] Directives

The preprocessing directives control the behavior of the preprocessor. Each directive occupies one line and has the following format:

Preprocessing directives must not come from macro expansion.

#define EMPTY EMPTY # include <file.h> // not a preprocessing directive

[edit] Capabilities

The preprocessor has the source file translation capabilities:

The following aspects of the preprocessor can be controlled:

[edit] Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

DR Applied to Behavior as published Correct behavior
CWG 2001 C++98 the behavior of using non-standard-defined directives was not clear made conditionally-supported

[edit] See also