Apache OpenOffice (AOO) Bugzilla – Issue 90172
Compilation error in chart2/source/controller/dialogs/res_ErrorBar.cxx
Last modified: 2013-02-24 21:21:39 UTC
Error message: "/export/projects/ooo/mws/DEV300/trunk/chart2/source/controller/dialogs/res_ErrorBar.cxx", line 235: Error: Overloading ambiguity between "std::pow(double, double)" and "std::pow(double, int)". Target: chart2/source/controller/dialogs/res_ErrorBar.cxx Tag: DEV300_m14 (revision: 1.5) OS: Solaris 11 - Solaris Express Developer Edition 1/08 snv_79b X86 Compiler: Sun C++ 5.9 SunOS_i386 2007/11/15 isainfo -vk: 64-bit amd64 kernel modules Log: ============= Building module chart2 ============= ...(omitted)... Making: ../../unxsoli4.pro/slo/WrappedIgnoreProperty.obj /opt/SUNWspro/bin/CC -c -temp=/tmp -xarch=generic -xO3 -xspace -I. -I../../unxsoli4.pro/inc/charttools -I../inc -I../../source/inc -I../../inc/pch -I../../inc -I../../unx/inc -I../../unxsoli4.pro/inc -I. -I/export/projects/ooo/mws/DEV300/trunk/solver/300/unxsoli4.pro/inc/stl -I/export/projects/ooo/mws/DEV300/trunk/solver/300/unxsoli4.pro/inc/external -I/export/projects/ooo/mws/DEV300/trunk/solver/300/unxsoli4.pro/inc -I/export/projects/ooo/mws/DEV300/trunk/solenv/unxsoli4/inc -I/export/projects/ooo/mws/DEV300/trunk/solenv/inc -I/export/projects/ooo/mws/DEV300/trunk/res -I/export/projects/ooo/mws/DEV300/trunk/solver/300/unxsoli4.pro/inc/stl -I/include -I/export/projects/ooo/mws/DEV300/trunk/solenv/inc/Xp31 -I/usr/j2se/include -I/usr/j2se/include/solaris -I/usr/j2se/include/native_threads/include -I/export/projects/ooo/mws/DEV300/trunk/solver/300/unxsoli4.pro/inc/offuh -I. -I../../res -I. -features=no%altspell -library=no%Cstd +w2 -erroff=doubunder,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn -KPIC -DSOLARIS -DUNX -DVCL -DC52 -DC52 -DINTEL -DCVER=C52 -mt -D_PTHREADS -DSYSV -DSUN -DSUN4 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DSTLPORT_VERSION=400 -D__DMAKE -DUNIX -DCPPU_ENV=sunpro5 -DSUPD=300 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DCUI -DSOLAR_JAVA -DDEV300=DEV300 -DSHAREDLIB -D_DLL_ -DEXCEPTIONS_ON -o ../../unxsoli4.pro/slo/WrappedIgnoreProperty.o /export/projects/ooo/mws/DEV300/trunk/chart2/source/tools/WrappedIgnoreProperty.cxx "/export/projects/ooo/mws/DEV300/trunk/chart2/source/controller/dialogs/res_ErrorBar.cxx", line 235: Error: Overloading ambiguity between "std::pow(double, double)" and "std::pow(double, int)". 1 Error(s) detected. dmake: Error code 1, while making '../../../unxsoli4.pro/slo/res_ErrorBar.obj' /usr/include/math.h #include <iso/math_iso.h> /usr/include/iso/math_iso.h namespace std { extern "C++" { inline double pow(double __X, int __Y) { return pow(__X, (double) (__Y)); } inline float pow(float __X, float __Y) { return __powf(__X, __Y); } inline float pow(float __X, int __Y) { return pow((double) (__X), (double) (__Y)); } inline long double pow(long double __X, long double __Y) { return __powl(__X, __Y); } inline long double pow(long double __X, int __Y) { return __powl(__X, (long double) (__Y)); } } /* end of namespace std */ sal/inc/sal/types.h #if SAL_TYPES_SIZEOFLONG == 4 typedef signed long sal_Int32; typedef unsigned long sal_uInt32; #define SAL_PRIdINT32 "ld" #define SAL_PRIuUINT32 "lu" #define SAL_PRIxUINT32 "lx" #define SAL_PRIXUINT32 "lX" #elif SAL_TYPES_SIZEOFINT == 4 typedef signed int sal_Int32; typedef unsigned int sal_uInt32; #define SAL_PRIdINT32 "d" #define SAL_PRIuUINT32 "u" #define SAL_PRIxUINT32 "x" #define SAL_PRIXUINT32 "X" #else #error "Could not find 32-bit type, add support for your architecture" #endif
Created attachment 54091 [details] An experimental patch
@IHA: pls have a look
raised prio, breaks sun-buildbot-sols1 (see, e.g., <http://buildbot.go-oo.org/buildbot/Solaris-Sparc/builds/192>)
Raising the prio further as this hinders development now. The attached patch is ok and solves the problem. It should be integrated into 3.0 code line.
@Oliver, the attached patch should be integrated into the next master for OOo 3.0. Thanks for integration!
Commited into MWS DEV300 m28.
@Ingrid: verify, please.
@Oliver: Thank you for the fix. I appreciate you using 'static_cast< int >( ... )' instead of '(int)...' which is preliminarily introduced in the patch attached in this issue. FYI. I have confirmed both the C++- and C-style of type conversion solve this problem under the circumstances described at the beginning of this issue.
Verified in res_ErrorBar.cxx,v1.6. Thanks!
seen ok in master on dev300m28 in res_ErrorBar.cxx,v1.6 -->closing