3 ms·
If the C compiler accepts it, it is C.
by ryao 1y ago
If the C compiler accepts it, it is C.
- zabzonk 1y agoThere is no one "the C compiler".
- WalterBright 1y agoPedantically, the preprocessor is an entirely separate language. The lexing, parsing, expressions, and semantics are totally distinct. The preprocessor is usually implemented as a completely independent program. My first C compiler did integrate the preprocessor with the C compiler, but that was for performance reasons. Currently, ImportC runs cpp and then lexes/parses the resulting C code for use in D.
- ryao 1y agoIt is part of the C standard. Whether it is part of a separate binary is an implementation choice.
- WalterBright 1y agoTrue on both counts. But they are still separate and distinct languages.
- ryao 1y agoC is a composition of what you describe as separate languages. They are both parts of C. That is why we call unpreprocessed code C code.