Preprocessor C continues to run while there is nothing more to expand. This is not a matter of passages; it is a matter of completeness.
This avoids the recursive extension of macros. Once a macro has been expanded once, it will not be re-expanded in the replacement text.
The only thing that the standard says about restrictions on macro expansion is contained in Β§5.2.4.1. The limits of translation, where it says:
An implementation must be able to translate and execute at least one program that contains at least one instance of each of the following limits: 18)
...
- 4095 macro identifiers defined simultaneously in one preprocessor translation unit
18) Implementations should avoid introducing fixed translation restrictions when possible.
So, the preprocessor should be able to process at least 4095 macros, and if all but one of these macros expand sequentially to another macro, as in your example, the result should be correct.
source share