Skip to main content
Engineering LibreTexts

1.6: Preprocessing

  • Page ID
    40632
  • Taking another step backward through the compilation process, you can use the -E flag to run the preprocessor only:

    $ gcc hello.c -E
    

    The result is the output from the preprocessor. In this example, it contains the included code from stdio.h, and all the files included from stdio.h, and all the files included from those files, and so on. On my machine, the total is more than 800 lines of code. Since almost every C program includes stdio.h, those 800 lines of code get compiled a lot. If, like many C programs, you also include stdlib.h, the result is more than 1800 lines of code.

    • Was this article helpful?