Closed Bug 1029702 Opened 11 years ago Closed 11 years ago

TypedObjectPrediction.cpp:332:13: warning: overflow in implicit constant conversion [-Woverflow]

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1029126

People

(Reporter: dholbert, Unassigned)

Details

New build warning, with GCC (version 4.9) on 64-bit Ubuntu 14.04: { js/src/jit/TypedObjectPrediction.cpp:332:13: warning: overflow in implicit constant conversion [-Woverflow] *offset = SIZE_MAX; ^ } Link to source: http://hg.mozilla.org/mozilla-central/annotate/e86b84998b18/js/src/jit/TypedObjectPrediction.cpp#l332 "offset" is a pointer to a int32_t, so SIZE_T is too large for it, both on 64-bit and 32-bit systems. Presumably either offset should have type size_t*, or we should be using INT32_MAX or whatever the appropriate name is. Niko, can you take this and apply whatever fix matches your intent about what should be happening here?
Flags: needinfo?(nmatsakis)
> "offset" is a pointer to a int32_t, so SIZE_T is too large for it (er, meant to say "SIZE_MAX is too large for it")
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(nmatsakis)
Resolution: --- → DUPLICATE
No longer blocks: buildwarning, 1022356
You need to log in before you can comment on or make changes to this bug.