I am currently reading: enter link description here -Which is gcc the C preprocessor documentation.
But still even if I look for other documentations, I am not able to find the true macro implementation. A have found a exe
:cc1
file in /usr/lib/gcc/x86_64-linux-gnu/8/cc1
, which should be used in a phase (do not know which one) of compiling according to this: enter link description here
But in what language is actually preprocessor implemented, I mean - it is historically older then c , so I would suppose assembler or similar. The main reason for this is, How can I implement or extend it by my own directives. Some suggests to use quick perl
program to do this for me before compilation by gcc
, but I am still wondering where to find files of preprocessor implemented in c in linux (if exists in c source file
and not elf file
or already as object file - as cc1
does - then I am not able to read the implementation of course. I would be also glad if anyone can mention that phase of macro preprocessing (not asking about explanation of individually directives, rather how it inner does it job).
I just want to look in its intestines.