Most compilers have a number of switches or options which can be set to control how the compiler works and what additional output it produces. Some of the more useful ones, found on many systems, are described below. Good compilers indicate which names have only been used once as these often indicate a programming mistake. Often it is possible to choose the optimization level. Highly optimised machine code may execute faster but if the source code lines are rearranged error messages may be less helpful.
Many systems allow additional code to be included which check for errors at run-time.
Such errors are not uncommon, so this assistance is very valuable. Some programming manuals suggest that these options should only be selected during program development and switched-off thereafter in the interests of speed. This is rather like wearing seat-belts in the car only while you are learning to drive and ignoring them as soon as you are allowed out on the motorway. Linking At its simplest, the linker just takes the set of object modules produced by the compiler and links them all together into an executable image. One of these modules must correspond to the main program unit, the other modules will correspond to procedures and to block data subprogram units.