public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Build of egcs-971031 on m68k-next-nextstep3 fails in libstc++
@ 1997-11-01 15:16 Toon Moene
  1997-11-02 21:29 ` Jeffrey A Law
  0 siblings, 1 reply; 2+ messages in thread
From: Toon Moene @ 1997-11-01 15:16 UTC (permalink / raw)
  To: egcs

In preparation of doing a full test of the current snapshot, I  
downloaded and started to build the entire egcs-971031.tar.gz  
distribution (previously I only build core + g77).

Alas, the build dies as follows:

/Users/toon/Unix/compilers/egcs-971031/gcc/xgcc  
-B/Users/toon/Unix/compilers/egcs-971031/gcc/ -c -g -O2  
-fno-implicit-templates -I. -I./stl -I../libio -I./../libio  
-nostdinc++  -DF `for N in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC  
MULCC MULCF MULFC DIVCC DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC  
NECF NEFC ABS ARG POLAR CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI  
POWFC SIN SINH SQRT; do echo " -D${N}"; done` \
  ./cinst.cc -o fcomplex.o
In file included from cmath:7,
                 from std/complext.h:34,
                 from complex:7,
                 from std/complext.cc:28,
                 from ./cinst.cc:29:
/NextDeveloper/Headers/ansi/math.h:59: warning: declaration of  
`const double cos(double)'
/NextDeveloper/Headers/ansi/math.h:59: warning: conflicts with  
built-in declaration `double cos(double)'
/NextDeveloper/Headers/ansi/math.h:60: warning: declaration of  
`const double sin(double)'
/NextDeveloper/Headers/ansi/math.h:60: warning: conflicts with  
built-in declaration `double sin(double)'
/NextDeveloper/Headers/ansi/math.h:72: warning: declaration of  
`const double sqrt(double)'
/NextDeveloper/Headers/ansi/math.h:72: warning: conflicts with  
built-in declaration `double sqrt(double)'
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
make[2]: *** [bigstmp-complex] Error 1
make[2]: Leaving directory  
`/Users/toon/Unix/compilers/egcs-971031/libraries/libstdc++'
make[1]: *** [all-target-libstdc++] Error 2
make[1]: Leaving directory `/Users/toon/Unix/compilers/egcs-971031'
make: *** [bootstrap] Error 2

Apparently, the declaration of `hypot' in the NEXTSTEP header file  
conflicts with that in the egcs/libstc++ header file.

I don't know which one is right, but at the very least this means  
that egcs doesn't build out-of-the-box on NEXTSTEP.  What is the  
best workaround in cases like this ?

TIA,
Toon.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Build of egcs-971031 on m68k-next-nextstep3 fails in libstc++
  1997-11-01 15:16 Build of egcs-971031 on m68k-next-nextstep3 fails in libstc++ Toon Moene
@ 1997-11-02 21:29 ` Jeffrey A Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeffrey A Law @ 1997-11-02 21:29 UTC (permalink / raw)
  To: Toon Moene; +Cc: egcs

  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-11-02 21:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-01 15:16 Build of egcs-971031 on m68k-next-nextstep3 fails in libstc++ Toon Moene
1997-11-02 21:29 ` Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).