I am tying to existing c++ code (compilable with gcc version 4.3.4) with gcc version 10 but getting error. below is the compilation command and error.
g++ -m32 -pipe -g -MD -O3 -mcpu=pentium4 -mfpmath=sse -msse2 -Dlint -DLinux -D_REENTRANT - DOS_LINUX_2_2 -DOS_USE_ALTERNATE_STD -DOS_NO_WSTRING -DOS_MULTI_THREADED -DOS_LINUX_PTHREADS -DOS_PTHREADS -DOS_REALTIME -D_REENTRANT -DCC_DEBUG=0 -DNDEBUG -I. -I/{PATHS} -c source.cpp -o obj/source.o
g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
In file included from /usr/include/c++/10/bits/stl_algobase.h:61,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from /home/build/builds/include/sync/std/iostream:13,
from /home/build/builds/Shared/Cpp/Include/unix/ccBase2.h:380,
from /home/build/builds/Shared/Cpp/Include/ccBase.h:47,
from /home/build/builds/Shared/Cpp/Include/borisBase.h:11,
from source.cpp:7:
/usr/include/c++/10/bits/cpp_type_traits.h:436:12: error: partial specialization ‘struct std::__is_nonvolatile_trivially_copyable<_Tp>’ does not specialize any template arguments; to define the primary template, remove the template argument list
436 | struct __is_nonvolatile_trivially_copyable<volatile _Tp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/cpp_type_traits.h:427:12: note: primary template here
427 | struct __is_nonvolatile_trivially_copyable
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
there are many other errors also. When I try to run a sample program with this header included it compiled successfully.
#include<bits/cpp_type_traits.h>
#include<iostream>
int main()
{
std::cerr<<"Hello";
return 0;
}
What could be the issue?
Aucun commentaire:
Enregistrer un commentaire