https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109936

--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Adam Wozniak from comment #12)
> 
> No, i am fairly CERTAIN they are different executables.

GCC has been using an integrated preprocessor since GCC 3.0 timeframe (~2000 or
maybe even before). It is implemented in a library called libcpp in fact.


> i can even invoke one without the other; /lib/cpp can be invoked directly,
> and g++ can be told to skip the preprocessor by renaming your source file
> *.i or *.ii.

g++ and /lib/cpp (which is really gcc) are called drivers which launches the
actually compiler (cc1 and cc1plus). What happens when you name the file *.ii,
it just passes -fpreprocessed down to the actually compiler which skips part of
the preprocessing stage but the lexing (tokenizing) stage is still done. You
can also pass -E to cause the compiler just do the preprocessing stage for you
and write out the result (note tokenization happens during that too).

The name preprocessor is still used even though most compilers don't have a
seperate program that does the preprocessing any more.

It is funny arguing with folks who write parts of GCC on an idea of integrated
vs seperate preprocessor really.

Reply via email to