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]: fixincludes hack for solaris11 c99-math testsuite failures


Kaveh R. Ghazi wrote:

No it's not a runtime library issue. Sun's compiler doesn't emit library calls to implement the FP classification macros. It has compiler builtins and the header reflects this by using them in the macros for Sun C. GCC-4.3 also has compiler builtins for these. Sun wanted to be GCC-friendly in their header but since they don't know what version of GCC a user might install, they tried to write generic implementations inside a GNUC clause of their header that didn't rely on a GCC builtin, so e.g. a user installing older gcc like 4.2 would still hav it work. They almost got it right, but isinf is broken, and presumably only for GCC.

Thanks for explaining.


This still isn't the kind of thing we normally fix with fixincludes. What we've normally used fixincludes for is things like a header that uses non-standard extensions that we can't parse, or that contains invalid code that we don't want to accept, or that injects names into the user namespace that it shouldn't. These are situations that make including the header with GCC basically fatal.

This case is different; the code compiles fine with GCC, it just doesn't work. Roughly speaking, it's as if the C library had a bug, even though the implementation may be in the header.

But, if the regexp is really limited enough, then I guess it's relatively harmless to fix it.

With regards to limiting it (or not) to solaris11, I could very easily take out the "mach" statement, or better still make it limited to "solaris2.*" just to be conservative and not touch any other platforms. That would allow carrying forward gcc binaries on solaris.

OK for 4.4 with that change.


--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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