The parser (maybe the preprocessor?) should check for unreachable blocks. These would have unsatisfiable presence conditions. Then, the parser will not create redundant declarations.
For example:
#ifdef A
#ifndef A
int i = 0; // unreachable
#endif
#endif
The parser (maybe the preprocessor?) should check for unreachable blocks. These would have unsatisfiable presence conditions. Then, the parser will not create redundant declarations.
For example: