More pedantic C++

Started by
5 comments, last by MaulingMonkey 18 years, 10 months ago
Is the preprocessor part of the compiler? If not, what is the 'compiler executable' suppose to be called since everyone calls it the compiler?
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Advertisement
The preprocessor is part of the compiler (at least part of the most compilers).
If not, the compiler will be called a compiler, the preprocessor would be called a preprocessor, and the executable would be called make :D
You know, if you wern't the great MKH, I'd be wondering why you were asking such silly questions [wink].

In any case, the preprocessor (in general, lingusticly and actually) would be considered a part of the compiler.

Without context, the question is difficult to answer. In a conversation I would be asking for more clarification and/or giving more general and detailed answers.

Alternativly: "It depends. What is being preprocessed?"
Conceptually, I'd say the preprocessor is seperate from the compiler. In reality, it makes sence for the two to be part of the one executable. We call that executable the compiler because the preprocessor is by far the lesser part of it, both in terms of importance and volume.
Quote:Original post by Magmai Kai Holmlor
Is the preprocessor part of the compiler?
If not, what is the 'compiler executable' suppose to be called since everyone calls it the compiler?


In actual implementations, I believe the preprocessor is usually part of the compiler executable. In the C standard (and I believe in the C++ standard) the "preprocessor stage" is distinct from the "compilation stage". I think the standard does not have a name for the compiler executable, but would call the compiler executable and associated files, and the OS, etc. "the implementation".

I think it's best to just use the colloquial "compiler" for the compiler executable since that's what it's usually called and is usually the proper term in other languages (which don't usually define so many compilation stages).
Thanks guys, again I'll be reworking that question.
The question asked what the compiler was responsible for, but the intent was what's the compiler responsible for as opposed to the preprocessor even though it didn't say that in the question. So when 'expand macros' was listed, it wasn't perfectly clear to me if the answer should be yes or no.

(I'm reviewing the TeckCheck C++ test questions..... Muauhahahaha, you're all doomed! Seriously, I'm focusing on making them less ambiguous, double checking all the answers are correct, and checking the statistics to ensure they are effective questions.)
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Some of the GCC documentation refers to the "compiler executable" (g++, gcc, etc) as the "compiler driver" (see http://www.gnu.org/software/gcc/faq.html#dso under 5.2 (anchor tag leads to that), bullet 3)

This topic is closed to new replies.

Advertisement