This is the mail archive of the gcc@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]

Re: v3 link failures analyzed


Robert Lipe <robertl@sco.com> writes:

| Here's an interesting kink.  I suspect that this will show up in a
| couple of different host environments that offer different degrees of
| masochism for standards conformance.
| 
| On OpenServer's GCC, "-ansi" actually picks up a different set of
| includes (/us/rinclude/ansi instead of /usr/include) that offers a
| namespace that's restricted to that of ANSI C.  For example, ISO
| C doesn't offer sqrtf so the system in -ansi mode mustn't offer a
| prototype for it in math.h.  This is parallel to a similar behaviour
| (although with a slightly different invocation spelling) of the native
| compiler.
| 
| Here's the catch: When libstdc++-v3 builds config.h, '-ansi' is not
| present on the compilation line so we #define HAVE_SQRTF 1.

It is a real pleasure to work with you :-)

[...]

| Although my example picks on sqrtf, there are actually about a dozen
| such affected functions in math.h alone.  Advice?

This is a serious bug in the library design: We should not test for
non ISO C90 features when it comes to decide which symbols should be
defined in the headers.

I promise to look into these shortly.

Thanks for your patience,

-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com

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