compiler errors with gxx -ansi

compiler errors with gxx -ansi

Post by EPers » Sat, 12 Jul 2003 03:28:20



#include <iostream>

int main() {
  std::cout << "Hello, world!\n";

Quote:}

If I try to compile this with "gxx -ansi", I get a lot of errors in
the system libraries.

In file included from D:/DJGPP/lang/cxx/3.3/bits/locale_facets.tcc:41,
                 from D:/DJGPP/lang/cxx/3.3/locale:47,
                 from D:/DJGPP/lang/cxx/3.3/bits/ostream.tcc:37,
                 from D:/DJGPP/lang/cxx/3.3/ostream:535,
                 from D:/DJGPP/lang/cxx/3.3/iostream:45,
                 from test.cpp:1:
D:/DJGPP/lang/cxx/3.3/cmath:107: error: `acosf' not declared
D:/DJGPP/lang/cxx/3.3/cmath:110: error: `asinf' not declared
D:/DJGPP/lang/cxx/3.3/cmath:113: error: `atanf' not declared

etc.

D:/DJGPP/lang/cxx/3.3/cmath:184: error: `acosf' undeclared in
namespace `
   __gnu_cxx::__c99_binding'
D:/DJGPP/lang/cxx/3.3/cmath: In function `float std::asin(float)':
D:/DJGPP/lang/cxx/3.3/cmath:204: error: `asinf' undeclared in
namespace `
   __gnu_cxx::__c99_binding'
D:/DJGPP/lang/cxx/3.3/cmath: In function `float std::atan(float)':
D:/DJGPP/lang/cxx/3.3/cmath:222: error: `atanf' undeclared in
namespace `
   __gnu_cxx::__c99_binding'

etc.

This does not happen if I don't use -ansi. How can this be fixed?

--
Eric Schmidt

 
 
 

compiler errors with gxx -ansi

Post by DJ Delori » Sat, 12 Jul 2003 03:39:32


Quote:> This does not happen if I don't use -ansi. How can this be fixed?

Er... don't use -ansi.

"Doctor!  Doctor!  It hurts when I do this..."

 
 
 

1. Internal compiler error with gxx 280

I tried the 2.8.0 alpha, compiled by Robert Hoehne, and noticed the
following behaviour:

##############################

*** Command: ***
cc1plus -version bug.ii

*** File (bug.ii): ***
----->8----->8----->8----->8-----
class c {
  void (c::*x)();
public:
  void f() { this->x(); }
----->8----->8----->8----->8-----

*** Output: ***
GNU C++ version 2.8.0 (djgpp) compiled by GNU C version 2.8.0.
options passed:
options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
 -fpcc-struct-return -fcommon -fgnu-linker -m80387 -mhard-float
 -mno-soft-float -mieee-fp -mfp-ret-in-387 -mschedule-prologue -mcpu=i386
 -march=pentium
 void c::f()
bug.ii:4: Internal compiler error.

##############################


or is this DJGPP-specific?

Any solutions? 2.7.2 on SunOS says:
bug.ii: In method `void c::f()':
bug.ii:4: no member function `c::x()' defined

--
Groeten, Michel.        http://www.cs.vu.nl/~mdruiter
 \----/==\----/
  \  /    \  /          "You know, Beavis, you need things that suck,
   \/      \/           to have things that are cool", Butt-Head.

2. Fuzzy Logic Algorithms

3. Errors when compiling with gcc/gxx

4. Oracle 8 on Novell 5?

5. Error When compiling cpp or cc programs with either gcc or gxx

6. Get on "Interested parties list" ?

7. gxx -o file.exe file.o -lstdcx: error

8. HELP PLEASE!!! - Reduce Form loading time?

9. The Program have no error but the Compiler say "There is some error".

10. compiler error or programmer error?

11. Error: Internal compiler error

12. ANSI C Compiler for the XT?

13. shareware ansi c compiler for a 286