From: | Nils <n.pipenbrinck@cubic.org> |
Newsgroups: | comp.compilers |
Date: | Thu, 25 Sep 2008 00:30:18 +0200 |
Organization: | Compilers Central |
References: | 08-09-076 08-09-105 08-09-110 08-09-115 08-09-119 |
Keywords: | errors |
Posted-Date: | 25 Sep 2008 11:42:25 EDT |
Chris F Clark wrote:
> So, I wonder, how many of you have experienced real compiler bugs,
> that you could verify was the compilers fault and not just "mysterious
> behavior" that could be fixed by changing the optimizer/debugger
> level?
I had my share with the Metrowerks C-Compiler for the DreamCast
game-consone (SH4).
The versions I've worked with had lots of problems with the difference
between signed and unsigned. That manifested in very obscure and hard to
find bugs.
Here is my favorite: For switch-statements with sparse cases the
compiler built a binary search tree. Unfortunately the code-generator
prepared the code for unsigned values and used signed branches. That
worked as long as you never used negative values or unsigned values with
the MSB set.
I found more than a dozen of related bugs.
I still feel bad for the development guys at mwerks. For some reason we
always found the bugs near the end of the week, and we always got a
patch on monday. I know that I ruined more than one weekend.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.