Closed Bug 1766370 Opened 2 years ago Closed 2 years ago

Fix bitfield-enum-conversion warnings in Windows builds

Categories

(Core :: JavaScript Engine: JIT, defect)

defect

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

js/src/jit/x86-shared/Architecture-x86-shared.h(326,9): error: signed bit-field 'reg_' needs an extra bit to represent the largest positive enumerators of 'XMMRegisterID' [-Werror,-Wbitfield-enum-conversion]
      : reg_(Codes::Encoding(r)), type_(k), isInvalid_(false) {}
        ^
js/src/jit/x86-shared/Architecture-x86-shared.h(310,3): note: consider making the bitfield type unsigned
  Codes::Encoding reg_ : 5;
  ^~~~~~~~~~~~~~~
(...)
js/src/jit/RangeAnalysis.h(378,28): error: signed bit-field 'canHaveFractionalPart_' needs an extra bit to represent the largest positive enumerators of 'FractionalPartFlag' [-Werror,-Wbitfield-enum-conversion]
    canHaveFractionalPart_ = canHaveFractionalPart;
                           ^
js/src/jit/RangeAnalysis.h(227,25): note: consider making the bitfield type unsigned
  MOZ_INIT_OUTSIDE_CTOR FractionalPartFlag canHaveFractionalPart_ : 1;
                        ^~~~~~~~~~~~~~~~~~
(...)
js/src/jit/RangeAnalysis.h(379,24): error: signed bit-field 'canBeNegativeZero_' needs an extra bit to represent the largest positive enumerators of 'NegativeZeroFlag' [-Werror,-Wbitfield-enum-conversion]
    canBeNegativeZero_ = canBeNegativeZero;
                       ^
js/src/jit/RangeAnalysis.h(228,25): note: consider making the bitfield type unsigned
  MOZ_INIT_OUTSIDE_CTOR NegativeZeroFlag canBeNegativeZero_ : 1;
                        ^~~~~~~~~~~~~~~~

js/src/jit/x86-shared/Architecture-x86-shared.h(326,9): error: signed bit-field 'reg_' needs an extra bit to represent the largest positive enumerators of 'XMMRegisterID' [-Werror,-Wbitfield-enum-conversion]
: reg_(Codes::Encoding(r)), type_(k), isInvalid_(false) {}
^
js/src/jit/x86-shared/Architecture-x86-shared.h(310,3): note: consider making the bitfield type unsigned
Codes::Encoding reg_ : 5;
^~~~~~~~~~~~~~~
(...)
js/src/jit/RangeAnalysis.h(378,28): error: signed bit-field 'canHaveFractionalPart_' needs an extra bit to represent the largest positive enumerators of 'FractionalPartFlag' [-Werror,-Wbitfield-enum-conversion]
canHaveFractionalPart_ = canHaveFractionalPart;
^
js/src/jit/RangeAnalysis.h(227,25): note: consider making the bitfield type unsigned
MOZ_INIT_OUTSIDE_CTOR FractionalPartFlag canHaveFractionalPart_ : 1;
^~~~~~~~~~~~~~~~~~
(...)
js/src/jit/RangeAnalysis.h(379,24): error: signed bit-field 'canBeNegativeZero_' needs an extra bit to represent the largest positive enumerators of 'NegativeZeroFlag' [-Werror,-Wbitfield-enum-conversion]
canBeNegativeZero_ = canBeNegativeZero;
^
js/src/jit/RangeAnalysis.h(228,25): note: consider making the bitfield type unsigned
MOZ_INIT_OUTSIDE_CTOR NegativeZeroFlag canBeNegativeZero_ : 1;
^~~~~~~~~~~~~~~~

Depends on: 1762484
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/b3e2641c90ce Fix bitfield-enum-conversion warnings in Windows builds. r=jandem

Backed out for causing spidermonkey bustage

[task 2022-04-26T07:07:04.563Z] In file included from /builds/worker/checkouts/gecko/js/src/jit/Registers.h:14:0,
[task 2022-04-26T07:07:04.563Z]                  from /builds/worker/checkouts/gecko/js/src/wasm/WasmFrame.h:266,
[task 2022-04-26T07:07:04.563Z]                  from /builds/worker/checkouts/gecko/js/src/wasm/WasmDebugFrame.h:30,
[task 2022-04-26T07:07:04.563Z]                  from /builds/worker/checkouts/gecko/js/src/vm/Stack.h:30,
[task 2022-04-26T07:07:04.563Z]                  from /builds/worker/checkouts/gecko/js/src/vm/Activation.h:25,
[task 2022-04-26T07:07:04.563Z]                  from /builds/worker/checkouts/gecko/js/src/vm/JSContext.h:32,
[task 2022-04-26T07:07:04.563Z]                  from /builds/worker/checkouts/gecko/js/src/util/AllocPolicy.cpp:9,
[task 2022-04-26T07:07:04.563Z]                  from Unified_cpp_js_src_util0.cpp:2:
[task 2022-04-26T07:07:04.563Z] /builds/worker/checkouts/gecko/js/src/jit/x86-shared/Architecture-x86-shared.h:310:26: error: 'js::jit::FloatRegister::reg_' is too small to hold all values of 'using Encoding = enum js::jit::X86Encoding::XMMRegisterID {aka enum js::jit::X86Encoding::XMMRegisterID}' [-Werror]
[task 2022-04-26T07:07:04.563Z]    Codes::Encoding reg_ : 5;
[task 2022-04-26T07:07:04.563Z]                           ^
[task 2022-04-26T07:07:04.563Z] cc1plus: all warnings being treated as errors
[task 2022-04-26T07:07:04.563Z] gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:659: Unified_cpp_js_src_util0.o] Error 1
Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/206cd458a5eb Fix bitfield-enum-conversion warnings in Windows builds. r=jandem
Flags: needinfo?(mh+mozilla)
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: