使用 GCC 6.1.0 在 DJGPP 上编译以下代码
#include <cmath>
int main() {}
导致以下错误:
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
周围的一切cpp_type_traits.h:162
看起来都很正常:
template<>
struct __is_integer<unsigned char>
{
enum { __value = 1 };
typedef __true_type __type;
};
怎么了?