Issue 90172 - Compilation error in chart2/source/controller/dialogs/res_ErrorBar.cxx
Summary: Compilation error in chart2/source/controller/dialogs/res_ErrorBar.cxx
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: Unknown All
: P1 (highest) Trivial (vote)
Target Milestone: ---
Assignee: IngridvdM
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-30 19:38 UTC by tora3
Modified: 2013-02-24 21:21 UTC (History)
6 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
An experimental patch (1.13 KB, patch)
2008-05-30 19:45 UTC, tora3
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description tora3 2008-05-30 19:38:05 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
Comment 1 tora3 2008-05-30 19:45:36 UTC
Created attachment 54091 [details]
An experimental patch
Comment 2 kla 2008-06-02 08:03:42 UTC
@IHA: pls have a look
Comment 3 Stephan Bergmann 2008-07-23 15:55:31 UTC
raised prio, breaks sun-buildbot-sols1 (see, e.g.,
<http://buildbot.go-oo.org/buildbot/Solaris-Sparc/builds/192>)
Comment 4 IngridvdM 2008-07-25 07:49:04 UTC
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.
Comment 5 IngridvdM 2008-07-25 08:40:37 UTC
@Oliver, the attached patch should be integrated into the next master for OOo
3.0. Thanks for integration!
Comment 6 oliver.bolte 2008-07-25 09:30:46 UTC
Commited into MWS DEV300 m28.
Comment 7 oliver.bolte 2008-07-25 09:33:55 UTC
@Ingrid: verify, please.
Comment 8 tora3 2008-07-25 09:40:34 UTC
@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. 
Comment 9 IngridvdM 2008-07-25 09:52:42 UTC
Verified in res_ErrorBar.cxx,v1.6. Thanks!
Comment 10 IngridvdM 2008-07-30 16:06:37 UTC
seen ok in master on dev300m28 in res_ErrorBar.cxx,v1.6
-->closing