[m-dev.] [reuse] diff: fix gcc problems

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Mar 13 07:19:37 AEDT 2001


On 28-Feb-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 27-Feb-2001, Peter Ross <Peter.Ross at cs.kuleuven.ac.be> wrote:
> > runtime/mercury.h:
> >     Don't use __builtin_{set,lng}jmp for versions of gcc less the gcc
> >     2.8.*.  Note this needs to be tested with a 2.8.*, compiler to see
> >     if the version needs to be even higher.
> 
> If this change is really needed on the reuse branch, then it is
> probably needed on the main and release branches too.
...
> It seems to work fine for me using gcc-2.7.2.3 on i586-pc-linux-gnu.

This change was introduced sometime between gcc 2.7 and 2.8.
It looks like SuSE may have included it in their patched version
of gcc 2.7.2.3 (e.g. maybe it was part of a bug fix in 2.8 that
they merged back into 2.7.2.3).

But it would be fine to just make it conditional on gcc 2.8 like in your
patch; it doesn't matter much if we don't get this optimization when
using obsolete versions of gcc, people who really want their code to run
fast will be using newer ones anyway.

Another alternative would be to add an autoconf test for it.
But I think testing it based on __GCC__ and __GCC_MINOR__ is better,
because it is simpler, and because it is less likely to break
when someone installs a new version of gcc without reinstalling Mercury.

So could you please commit that change on the main branch and
on the release branch?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list