C4312 warnings in js/src/jit/Registers.h js/src/jit/shared/Assembler-shared.h and js/src/gdb/tests/test-Interpreter.cpp

RESOLVED FIXED in Firefox 48

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: gps, Assigned: jandem)

Tracking

(Blocks: 1 bug)

unspecified
mozilla48
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox48 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
The following C4312 warnings are being unhidden in bug 1124033. When building with warnings as errors with VS2015u1 in automation, these fail the build.

js/src/jit/Registers.h(150): warning C4312: 'reinterpret_cast': conversion from 'unsigned int' to 'js::jit::Registers::RegisterContent *' of greater size
js/src/jit/Registers.h(152): warning C4312: 'reinterpret_cast': conversion from 'unsigned int' to 'js::jit::FloatRegisters::RegisterContent *' of greater size
js/src/jit/shared/Assembler-shared.h(549): warning C4312: 'type cast': conversion from 'unsigned int' to 'uint8_t *' of greater size
js/src/gdb/tests/test-Interpreter.cpp(81): warning C4312: 'type cast': conversion from 'unsigned int' to 'js::jit::BaselineFrame *' of greater size
js/src/gdb/tests/test-Interpreter.cpp(84): warning C4312: 'type cast': conversion from 'unsigned int' to 'js::jit::RematerializedFrame *' of greater size
(Assignee)

Updated

3 years ago
Flags: needinfo?(jdemooij)
(Assignee)

Comment 1

3 years ago
gps, are these the *only* C4312 warnings in js/src/? Are there other js/src/ warnings?

Asking because these particular warnings are trivial to fix (I've a patch), but if there are more we should consider suppressing them.
Flags: needinfo?(gps)
(Reporter)

Comment 2

3 years ago
Yes, this is the full list of C4312 warnings in js/src.
Flags: needinfo?(gps)
(Assignee)

Comment 3

3 years ago
Created attachment 8731757 [details] [diff] [review]
Patch
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Flags: needinfo?(jdemooij)
Attachment #8731757 - Flags: review?(nicolas.b.pierron)
Comment on attachment 8731757 [details] [diff] [review]
Patch

Review of attachment 8731757 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jit/shared/Assembler-shared.h
@@ +545,5 @@
>      CodeLocationJump() {
>          raw_ = nullptr;
>          setUninitialized();
>  #ifdef JS_SMALL_BRANCH
> +        jumpTableEntry_ = (uint8_t*)uintptr_t(0xdeadab1e);

nit: Add an extra space before uintptr_t.
Attachment #8731757 - Flags: review?(nicolas.b.pierron) → review+

Comment 6

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/d1fca8995788
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox48: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
(Reporter)

Updated

3 years ago
Blocks: 1259304
You need to log in before you can comment on or make changes to this bug.