This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: v3 link failures analyzed
- To: Robert Lipe <robertl at sco dot com>
- Subject: Re: v3 link failures analyzed
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 31 Dec 2000 13:55:11 +0100
- Cc: libstdc++-v3 at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <20001230160338.A3505@rjlhome.sco.com>
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