NEW 125102
[Win] (32-bit) Warning about truncated constant value in X86Assembler
https://bugs.webkit.org/show_bug.cgi?id=125102
Summary [Win] (32-bit) Warning about truncated constant value in X86Assembler
Brent Fulgham
Reported 2013-12-02 13:46:16 PST
Building JavaScriptCore on Windows shows the following warning (dozens of times) during a 32-bit build: 6>c:\projects\webkit\opensource\webkitbuild\release\include\private\javascriptcore\X86Assembler.h(2342): warning C4309: 'argument' : truncation of constant value The code generating the error is: void threeByteOp(ThreeByteOpcodeID opcode) { m_buffer.ensureSpace(maxInstructionSize); m_buffer.putByteUnchecked(OP_2BYTE_ESCAPE); >>> m_buffer.putByteUnchecked(OP2_3BYTE_ESCAPE); m_buffer.putByteUnchecked(opcode); } The "putByteUnchecked" takes a signed int8_t value. void putByteUnchecked(int8_t value) { putIntegralUnchecked(value); } OP2_3BYTE_ESCAPE is defined as: OP2_3BYTE_ESCAPE = 0xAE This resolves to decimal 174, which is outside the allowed range of -128 to +127. I'm not aware of this causing any functional problems, but the warning is annoying, and might signify something bad if the compiler decided to pass (11010001) "-47" instead of (10101110) "+174".
Attachments
Brent Fulgham
Comment 1 2015-02-02 15:00:23 PST
I think this has been fixed in recent WebKit sources. Can we close?
Mark Lam
Comment 2 2015-02-02 15:46:04 PST
(In reply to comment #1) > I think this has been fixed in recent WebKit sources. Can we close? I don't see any changes that could have made this warning go away. Has it stopped manifesting?
Note You need to log in before you can comment on or make changes to this bug.