|
|
|
|
|
by mehrdada
1498 days ago
|
|
You can do some tricks but the basic issue is that the "environment" in which you interpret the preprocessor directives for a ".h" file may change across different contexts resulting in a potentially distinct AST: simplest example is the common #ifndef guard (evaluates the true branch in the first load, false in subsequent ones). |
|
For instance, if the file was this:
the compiler would remember the “#ifndef MY_FILE_INCLUDE_GUARD” part.