WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
19824
javascriptcore\kjs\JSImmediate.h generates MSVC compiler warning.
https://bugs.webkit.org/show_bug.cgi?id=19824
Summary
javascriptcore\kjs\JSImmediate.h generates MSVC compiler warning.
Paul Pedriana
Reported
2008-06-30 02:17:49 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2008-06-30 08:09:03 PDT
At some point, we did try to appease MSVC in this regard, but then decided to stop wasting time on it, given that this warning makes no sense really, and modifications made on the Mac kept breaking Windows build. See WebKitLibraries/win/tools/vsprops/common.vsprops for the full list of warnings that we disable.
> That this function appears to not work on 64 bit is another issue.
That will be a serious issue if it doesn't work.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug