3 ms·
There are three (relevant) phases (see “translation phases” in section 5 of the standard): • program is lexed into preprocessing tokens; comments turn into whi
by fanf2 2y ago
There are three (relevant) phases (see “translation phases” in section 5 of the standard):
• program is lexed into preprocessing tokens; comments turn into whitespace
• preprocessor does its thing
• preprocessor tokens are turned into proper tokens; different kinds of number are disambiguated; keywords and identifiers are disambiguated
If you put an unclosed comment inside #if 0 then it won’t work as you might expect.
- dahart 2y agoAh, I see. You’re right!