There are four stages for GCC to compile c/c++ applications: Preprocessing, Compilation proper, Assembly, Linking.
The following table illustrates input, output, gcc options in the foure stages.
Here is an example for the stages of compiling a c++ executable.