Hacker News new | ask | show | jobs
by ryao 349 days ago
If the C compiler accepts it, it is C.
2 comments

Pedantically, 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.

It is part of the C standard. Whether it is part of a separate binary is an implementation choice.
True on both counts. But they are still separate and distinct languages.
C 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.
There is no one "the C compiler".
Pragmatically, the only C compiler that matters for what is or is not C is the one you are using.
Only if you are lucky enough to only use one compiler, or only one version of the same one.