This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Binutils actions? binutils/debug.c miscompiled with 2.95.4 < gcc < 3.0.2 in i386/ia32.
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- To: hans-peter dot nilsson at axis dot com
- Cc: binutils at sources dot redhat dot com, gcc-bugs at gcc dot gnu dot org,gwpt1 at cam dot ac dot uk, orjan dot friberg at axis dot com
- Date: 19 Dec 2001 10:00:39 +0000
- Subject: Re: Binutils actions? binutils/debug.c miscompiled with 2.95.4 < gcc < 3.0.2 in i386/ia32.
- References: <200112190322.EAA06006@ignucius.axis.se>
Hi Hans-Peter,
> Now the question: should we (if you want, read I) add some
> work-around in binutils for this?
As a general principle of course work-arounds are a bad idea, since
the "correct" thing to do is tio fix the bug in the compiler. But as
you point out:
> On the other hand these are popular releases/distributions of GNU
> software and gcc-3.0.2 isn't universal.
So people are likely to come across this bug.
Personally I would be in favour of disguising a work-around as a
coding enhancement. For example you might remove the tail recursion in
favour of a while loop (and cite performance optimisation as a reason
;-). ie if you can provide some semi-legitimate reason for changing
the code which also has the side-effect of working around the bug in
the older versions of gcc, then that would be much more acceptable.
Hoaky I know, and not something to be encouraged, but in this case it
seems to be a reasonable compromise.
Cheers
Nick