This is the mail archive of the gcc-patches@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: [PATCH] PR 15930: Fixinc for isnan on IRIX 6.5.18 and later


Roger Sayle wrote:
> 
> The following patch fixes the current bootstrap failure for mainline GCC
> on IRIX 6.5.18 and later.  The problem is that IRIX's system headers use
> a MIPSPro compiler intrinsic, __generic, to implement C99 macros such as
> isnan, isfinite, etc...  The bugzilla PR, PR libfortran/15930, is against
> libgfortran, but the same problem also affects C and C++ of these system
> functions.
> 
> This patch is actually a refinement of David Billinghurst's solution at
> http://gcc.gnu.org/ml/gcc-patches/2004-06/msg01695.html.

My apologies to David.  I don't read 100% of this list.
I catch stuff directed to me or containing "fixinc" in the subject.

>  He reported
> additional testsuite failures, probably caused by defining additional
> macros that interfere with the user's namespace.  These problems are
> resolved below by only defining the macros that would are defined by
> the original system headers, resulting in no testsuite regressions on
> IRIX 6.5.19.
> 
> [I apologise for using different idioms between irix___generic1 and
> irix___generic2, but the readability of inclhack.def seemed more
> important than style consistency in the machine generated header.]

It is hard to tell what is most important with a patch like this.
It is not readily apparent to me how these "__generic" macros work.
I find it interesting that you are emitting three external function
declarations in "irix___generic1", but not in "irix___generic2".
So, a couple of questions:

1.  Are we talking about specifically two __generic macros, or is
    this really a generally "__generic" transform that fixes up
    more than just the two examples?

2.  If there are just these two examples, would it make sense to just
    "select" all the text involved and just replace it?  Whatever.
    I'll leave it to your judgement.

> Ok for mainline?

fixinclude fixes ought to go in all active "lines" (assuming they have
shown to fix the problem *AND* not caused regressions with other fixes.
viz., you've done "make check" in the fixinc build directory.  Though
with searching for the oddball "__generic" thing, I would hope for no
conflicts....;)

Thanks!  Regards, Bruce


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