This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Binutils actions? binutils/debug.c miscompiled with 2.95.4 < gcc < 3.0.2 in i386/ia32.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]