Closed
Bug 863891
Opened 12 years ago
Closed 12 years ago
Warnings in branchTruncateDouble code, comparing signed-unsigned values
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: Waldo, Assigned: Waldo)
References
Details
Attachments
(1 file)
|
1.64 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
INT64_MIN == 0x8000000000000000 compares a signed value (left) to an unsigned value (right), because the right side's number doesn't fit in int64_t. Smacking an LL at the end doesn't help, because 0x8...0 doesn't fit in int64_t. Unary minus isn't a part of a numeric literal, so -0x8....0LL is the negation of an unsigned, which is unsigned.
As the Intel manuals don't talk about the negative-most integer but rather about an "indefinite integer value" that happens to also be the most negative one, it seems like the best workaround is to eschew INT*_MIN entirely here, and just to write out the hex constants manually. This patch does that (both x86 and x86-64, for consistency).
| Assignee | ||
Comment 1•12 years ago
|
||
Attachment #739837 -
Flags: review?(jdemooij)
Updated•12 years ago
|
Attachment #739837 -
Flags: review?(jdemooij) → review+
| Assignee | ||
Comment 2•12 years ago
|
||
Target Milestone: --- → mozilla23
Comment 3•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•