An error when compiling with GCC 4.3: invalid conversion from int' to 'cmComputeLinkDepends::DependSetList*'
I'm using SLES (SUSE Enterprise Linux) 11. There is GCC 4.3 and 4.8 as an option. With default GCC 4.3, I have got this error:
g++ -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -std=gnu++0x -I/usr/src/packages/BUILD/cmake-3.9.0/Bootstrap.cmk -I/usr/src/packages/BUILD/cmake-3.9.0/Source -I/usr/src/packages/BUILD/cmake-3.9.0/Source/LexerParser -I/usr/src/packages/BUILD/cmake-3.9.0/Utilities -c /usr/src/packages/BUILD/cmake-3.9.0/Source/cmComputeLinkDepends.cxx -o cmComputeLinkDepends.o
/usr/include/c++/4.3/ext/new_allocator.h: In member function 'void __gnu_cxx::new_allocator<_Tp>::construct(_Tp*, _Args&& ...) [with _Args = int, _Tp = cmComputeLinkDepends::DependSetList*]':
/usr/include/c++/4.3/bits/stl_vector.h:703: instantiated from 'void std::vector<_Tp, _Alloc>::push_back(_Args&& ...) [with _Args = int, _Tp = cmComputeLinkDepends::DependSetList*, _Alloc = std::allocator<cmComputeLinkDepends::DependSetList*>]'
/usr/src/packages/BUILD/cmake-3.9.0/Source/cmComputeLinkDepends.cxx:289: instantiated from here
/usr/include/c++/4.3/ext/new_allocator.h:114: error: invalid conversion from 'int' to 'cmComputeLinkDepends::DependSetList*'
gmake: *** [cmComputeLinkDepends.o] Error 1
I don't know, is GCC 4.3 still supported? When I had reported this issue, I supposed yes. Anyway, there is a success with 2th compiler.
%if 0%{?sles_version} && 0%{?suse_version} == 1110
BuildRequires: gcc48
BuildRequires: gcc48-c++
%endif
%build
%if 0%{?sles_version} && 0%{?suse_version} == 1110
export CC=gcc-4.8
export CXX=g++-4.8
%endif