Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling the compiler - how many times?

If you compile a new version of compiler, how many times should you recompile it iteratively?

First: compile the new version of compiler[1] using the old version[0].

Second: compile the new version[2] using the newly compiled one[1], to apply new optimizations and fix bugs to the binary, not present in old[0] compiler.

Now third? Compile again, using [2] to remove any potential bugs that could have resulted from bugs in [1] as result of faulty compilation by buggy [0]...?

...but if you're paranoid, maybe the bugs introduced by [0] into [1] caused [2] to be somewhat buggy too...?

Does going beyond [2] make sense at all?

like image 879
SF. Avatar asked Mar 11 '10 09:03

SF.


People also ask

How many types of compiling are there?

Following are the different types of Compiler: Single Pass Compilers. Two Pass Compilers. Multipass Compilers.

How many passes a compiler should have?

Compiler pass are two types: Single Pass Compiler, and Two Pass Compiler or Multi Pass Compiler. These are explained as following below.

Does compiling code take a long time?

It's kinda hard to quantify this... it depends a lot on your machine but the Linux Kernel can take half an hour to compile, OpenOffice used to take over an hour, and even Firefox took a good amount of time. 1000 lines is almost nothing in terms of software complexity.

What are the 3 steps of the compilation process?

There are three basic steps involved in compiling a C program: preprocessing, compilation of C source code to machine code (or assembly) (also called object code), and linking of multiple object files into a single binary executable program.


1 Answers

I'd stop when the result of compilation n is identical to the result of compilation n - 1; at that point you've reached steady state.

like image 92
T.J. Crowder Avatar answered Nov 14 '22 06:11

T.J. Crowder