PDA

View Full Version : Template compiler error with qatomic_x86.h



gmat4321
20th November 2013, 22:03
on RedHat 6.4 using gcc 4.4.6 I get the following template error in qatomic_x86.h

The compiler command is:
g++ -Wall -O0 -g3 -pipe -D_GLIBCXX_GTHREAD_USE_WEAK=0 -D_AIX -DVPP_CXXXLC -DRW_MULTI_THREAD -D_REENTRANT -DVISTAVIEW2 -DLINUX -D_GNU_SOURCE -D_XOPEN_SOURCE=1600 -D_RWCONFIG=12d_eval_redhat9 -I/usr/local/xprinter/include -I/include -I/usr/Versant/8/sdk/include/ -DNDEBUG -D_POWER -DOLYMPUS -DCRONUS -D_POSIX_SOURCE -D_ALL_SOURCE -DVERSANT_ANSI -D_THREAD_SAFE -D_REENTRANT -DVPP_CXXXLC -I. -I/working/projects/krzywick_RHEL_VG1.1_int/CentralStation/src/inc -I/src/inc -I/usr/Versant/8/sdk/include -I -I/usr/lpp/UMS/include -I/usr/lpp/som/include -I/opt/qt/mkspecs/linux-g++ -I. -I/opt/qt/include/QtCore -I/opt/qt/include/QtCore -I/opt/qt/include/QtGui -I/opt/qt/include -I../inc -c -o myfile.o myfile.C

The errors I see are:
/usr/Versant/8/sdk/include/cxxcls/perror.h: In member function ‘char* PError::get_error_number_str()’:
/usr/Versant/8/sdk/include/cxxcls/perror.h:151: warning: format ‘%d’ expects type ‘int’, but argument 3 has type 'o_err’

/opt/qt/include/QtCore/qatomic_x86.h: At global scope:
/opt/qt/include/QtCore/qatomic_x86.h:168: error: new declaration 'static bool QBasicAtomicOps<1>::ref(T&)’
/opt/qt/include/QtCore/qatomic_x86.h:99: error: ambiguates old declaration ‘static bool QBasicAtomicOps<size>::ref(T&) [with T = T, int size = 1]’
/opt/qt/include/QtCore/qatomic_x86.h:181: error: new declaration ‘static bool QBasicAtomicOps<2>::ref(T&)’
/opt/qt/include/QtCore/qatomic_x86.h:99: error: ambiguates old declaration ‘static bool QBasicAtomicOps<size>::ref(T&) [with T = T, int size = 2]’
. . .
. . .
. . .

Can anyone help with this ....

amleto
22nd November 2013, 01:07
fix the first error that is in perror.h