Summary: | GCC warning in testb3.cpp testAbsArgWithEffectfulDoubleConversion | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||
Component: | JavaScriptCore | Assignee: | Michael Catanzaro <mcatanzaro> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, ggaren, keith_miller, mark.lam, mcatanzaro, msaboff, saam | ||||
Priority: | P2 | ||||||
Version: | Other | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Attachments: |
|
Description
Michael Catanzaro
2016-10-23 08:26:17 PDT
Hm, I'm not sure how to fix this. I tried turning all the different definitions of isIdentical into template specializations, but that just added a bunch of new ambiguous function call build failures. Ah OK, the problem is the code is somehow accidentally using std::fabs and std::sqrt (not sure how) and getting a float result, but it looks like the test actually wants ::fabs and ::sqrt so that the return value will be a double. Alternatively, the return values could just be cast to double to fix the warning, but not sure if that would be right for this test or not. (In reply to comment #2) > Ah OK, the problem is the code is somehow accidentally using std::fabs and > std::sqrt (not sure how) and getting a float result, but it looks like the > test actually wants ::fabs and ::sqrt so that the return value will be a > double. Hm, I'm wrong, it doesn't silence the warning.... > Alternatively, the return values could just be cast to double to fix the > warning, but not sure if that would be right for this test or not. I think this should be fine. Created attachment 292546 [details]
Patch
Looks like Zan committed an identical patch today. |