I was going through the GCC man page, I found the following line:
file.i
C source code that should not be preprocessed.
I know that running gcc -E foo.c
stops the compiler after preprocessing;
but what is the real world application of creating .i
files.
Also is there a way of generating a .i
files other than gcc foo.c -E > foo.i
?
The .i
files are also called as "Pure C files". In preprocessing stage
Header files will be included.
Macros will be replaced.
Comments are removed.
Used for conditional compilation.
If you look at the .i
file you can see these things.
Command to generate .i
file is-
gcc -E foo.c -o foo.i
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With