Mail Archives: djgpp/1998/01/21/18:39:28
At 04:01 1/21/1998 +0200, Eli Zaretskii wrote:
>
>On Wed, 21 Jan 1998, Christopher Croughton wrote:
>
>> Incidentally, why do you have to rebuild gcc with itself? Is it just
>> to get the better optimisation, or is there some reason that building
>> it with the old version doesn't work properly?
>
>To get better code in GCC itself. This includes better optimizations and
>fewer bugs (because of bugs in code generation which are corrected in the
>newer version).
>
>Don't forget that GCC is just another program. So compiling it with a
>(hopefully) better compiler makes it better.
Also to test it, if you want. One can build the compiler 3 times:
Stage 1: Compiled with previous compiler, to bootstrap.
Stage 2: Compiled with Stage 1, to get optimizations, etc.
Stage 3: Compiled with Stage 2. Stages 2 and 3 should have identical object
code.
This way, if the (Stage 2) compiler generates bad code, it will show up in
that the Stage 3 compiler will crash or itself generate different code.
That's the theory, anyway.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -