From Thinking in C++ - Vol 1:
In the second pass, the code generator walks through the parse tree and generates either assembly language code or machine code for the nodes of the tree.
Well at least in GCC if we give the option of generating the assembly code, the compiler obeys by creating a file containing assembly code. But, when we simply run the command gcc
without any options does it not produce the assembly code internally?
If yes, then why does it need to first produce an assembly code and then translate it to machine language?