Is there a way to look at the preprocessor expanded file in C
I want to know how could we look at the C file after it has been expanded by the preprocessor before compilation with all the macro values put in the code inside the开发者_如何学Go function where ever they are used. Is there a way to do it?
You can ask gcc to do it for you gcc -E yourfile.cpp
That will expand macros and include files, all the preproccessing.
Just run it through cpp
:
cpp file.c
精彩评论