pp-import: export import header-name pp-tokens ; new-line export import header-name-tokens pp-tokens ; new-line export import pp-tokens ; new-line
Importable header "a.h":
#define X 123 // #1 #define Y 45 // #2 #define Z a // #3 #undef X // point of undefinition of #1 in "a.h"
Importable header "b.h":
import "a.h"; // point of definition of #1, #2, and #3, point of undefinition of #1 in "b.h" #define X 456 // OK, #1 is not active #define Y 6 // error: #2 is active
Importable header "c.h":
#define Y 45 // #4 #define Z c // #5
Importable header "d.h":
import "a.h"; // point of definition of #1, #2, and #3, point of undefinition of #1 in "d.h" import "c.h"; // point of definition of #4 and #5 in "d.h" int a = Y; // OK, active macro definitions #2 and #4 are valid redefinitions int c = Z; // error: active macro definitions #3 and #5 are not valid redefinitions of Z— end example