This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Build of egcs-971031 on m68k-next-nextstep3 fails in libstc++
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Subject: Re: Build of egcs-971031 on m68k-next-nextstep3 fails in libstc++
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 02 Nov 1997 22:03:01 -0700
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <9711012250.AA08033@moene.indiv.nluug.nl>you write:
> In file included from complex:7,
> from std/complext.cc:28,
> from ./cinst.cc:29:
> std/complext.h:314: declaration of C function `double hypot(double,
> double)' conflicts with
> /NextDeveloper/Headers/ansi/math.h:26: previous declaration `const
> double hypot(double, double)' here
Sigh. This is a bug in the nextstep headers.
They're using the old (and incorrect) method for trying to describe
a "pure" function by prefixing the function's return type with a
"const".
This is wrong because the "const" really applies to the return type,
not the function itself.
The right way to describe a "pure" function is to use an attribute,
but that only works with newer versions of gcc.
Anyway, enough background...
This is something we usually address with fixincludes; I'll see
what I can do if you send me a copy of /NextDeveloper/Headers/ansi/math.h
jeff