[Webkit-unassigned] [Bug 19824] New: javascriptcore\kjs\JSImmediate.h generates MSVC compiler warning.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 30 02:17:50 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=19824
Summary: javascriptcore\kjs\JSImmediate.h generates MSVC compiler
warning.
Product: WebKit
Version: 526+ (Nightly build)
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: ppedriana at gmail.com
javascriptcore\kjs\JSImmediate.h has the following code:
static bool isNegative(const JSValue* v)
{
ASSERT(isNumber(v));
return reinterpret_cast<uintptr_t>(v) & 0x80000000;
}
which generates the following warning under MSVC:
JSImmediate.h(88) : warning C4800: 'uintptr_t' : forcing value to bool 'true'
or 'false' (performance warning)
A simple workaround which results in identical behavior is to use the
following:
static bool isNegative(const JSValue* v)
{
ASSERT(isNumber(v));
return (reinterpret_cast<uintptr_t>(v) & 0x80000000) != 0;
}
That this function appears to not work on 64 bit is another issue.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list