Strange compilation errors when compiling C++ on DJGPP

334 Views Asked by At

Compiling the following code on DJGPP with GCC 6.1.0

#include <cmath>
int main() {}

results in the following error:

In file included from c:/djgpp/include/cxx/6.10/cmath:42:0,
                 from MAIN.CPP:1:
c:/djgpp/include/cxx/6.10/bits/cpp_type_traits.h:162:7: error: expected unqualified-id at end of input
       typedef __true_type __type;
       ^~~~~~~
c:/djgpp/include/cxx/6.10/bits/cpp_type_traits.h:162:7: error: expected '}' at end of input
c:/djgpp/include/cxx/6.10/bits/cpp_type_traits.h:162:7: error: expected '}' at end of input
c:/djgpp/include/cxx/6.10/bits/cpp_type_traits.h:162:7: error: expected '}' at end of input
c:/djgpp/include/cxx/6.10/bits/cpp_type_traits.h:162:7: error: unterminated #ifndef
MAIN.CPP: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status

Everything around cpp_type_traits.h:162 looks normal:

  template<>
    struct __is_integer<unsigned char>
    {
      enum { __value = 1 };
      typedef __true_type __type;
    };

What's going wrong?

0

There are 0 best solutions below