Where do we use .i files and how do we generate them?

后端 未结 2 1324
挽巷
挽巷 2021-02-04 13:23

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

2条回答
  •  盖世英雄少女心
    2021-02-04 13:58

    The .i files are also called as "Pure C files". In preprocessing stage

    1. Header files will be included.

    2. Macros will be replaced.

    3. Comments are removed.

    4. 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
    

提交回复
热议问题