Closed
Bug 1762933
Opened 3 years ago
Closed 3 years ago
Fix compiler errors on C++20
Categories
(Core :: JavaScript Engine, task, P1)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
101 Branch
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Three issues currently prevent compiling to C++20:
- The
static_cast
inDECLARE_ONE_BOOL_OPERATOR
can generate casts between incompatible types.
- This can be fixed by only using
static_cast
for integral types.
- Deprecated arithmetic conversion on enumerations.
- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1120r0.html
- This also affects the ARM64 simulator, but any updates there should happen in the main repository first.
- Deprecated implicit
this
capture.
Assignee | ||
Comment 1•3 years ago
|
||
Otherwise we can for example end up with generating static_cast
between const and non-const pointers.
Assignee | ||
Comment 2•3 years ago
|
||
Use std::underlying_type_t
to convert from an enum to its underlying type.
Depends on D142855
Assignee | ||
Comment 3•3 years ago
|
||
Implicit this
capture through =
is deprecated in C++20.
Depends on D142856
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/14e582a97f5f Part 1: Avoid static_cast on non-integral types. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/b1a9775198ab Part 2: Fix implicit coercion between different enum types. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/a9a3140427ea Part 3: Fix implicit this-capture in lambdas. r=tcampbell
Comment 5•3 years ago
|
||
(In reply to André Bargull [:anba] [back from break; working through mail backlog] from comment #0)
- This also affects the ARM64 simulator, but any updates there should happen in the main repository first.
FWIW, the chances of us ever pulling another VIXL version (with the simulator) are very small; for several years we've been hacking freely on our local copy.
Updated•3 years ago
|
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/14e582a97f5f
https://hg.mozilla.org/mozilla-central/rev/b1a9775198ab
https://hg.mozilla.org/mozilla-central/rev/a9a3140427ea
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox101:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
Updated•3 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•