Closed Bug 441303 Opened 16 years ago Closed 16 years ago

jsutil.cpp does not compile with Visual Studio 2003

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: longsonr, Unassigned)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
Compiler cannot determine which pow overload to use.
Attachment #326301 - Flags: review?(crowder)
What error messages do you see for this?  I'm surprised VC has multiple definitons of pow()...  powl() and powf() are standard math.h functions, I think?
This is what I get...

jsutil.cpp(92) : error C2666: 'pow' : 7 overloads have similar conversions
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(620): could be 'long double pow(long double,int)'
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(618): or       'long double pow(long double,long double)'
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(572): or       'float pow(float,int)'
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(570): or       'float pow(float,float)'
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(534): or       'double pow(int,int)'
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(532): or       'double pow(double,int)'
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(195): or       'double pow(double,double)'
        while trying to match the argument list '(int, double)'
make[1]: *** [jsutil.obj] Error 2
Comment on attachment 326301 [details] [diff] [review]
patch

Good to see Microsoft isn't afraid to abuse function-overloading.  :(
Attachment #326301 - Flags: review?(crowder) → review+
Robert:  Are you able to land this, or shall I?
Is js still a closed partition or has that all gone away in the brave new hg world?

I have general commit privileges so if there's nothing special about js any more I can land it.
Looks like you should be able to land away, if/when the tree is happy.
checked in.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: