You need to do your own homework.

The specifics of how a compiler does anything depend on the compiler. Microsoft compilers do things differently from gnu compilers, for example.