Open Bug 1768116 (C++20) Opened 2 years ago Updated 1 month ago

[meta] Compile as C++20

Categories

(Firefox Build System :: General, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: cpeterson, Unassigned)

References

(Depends on 2 open bugs, Blocks 8 open bugs)

Details

(Keywords: meta)

Who knows when we'll be able to compiled with -std=c++20, but in the meantime we can use this meta bug to gather the work needed to compile as C++20 and the new improvements that will become available with C++20.

When compiling as C++20, __cplusplus == 202002.

Summary of C++20 language changes: https://en.cppreference.com/w/cpp/20

Clang's C++20 support: https://clang.llvm.org/cxx_status.html#cxx20

GCC's C++20 support: https://gcc.gnu.org/projects/cxx-status.html#cxx20

No longer blocks: 1717448
Summary: Compile as C++20 → [meta] Compile as C++20
Blocks: 1768117
No longer blocks: 1768117
See Also: → 1768117
Depends on: 1769484
Depends on: 1769778
Depends on: 1770107
Depends on: 1774336
Depends on: 1774522
Depends on: 1775162
Depends on: 1750610
Depends on: 1776347
Depends on: 1515434
Depends on: 1781001
No longer depends on: Wdeprecated-volatile
See Also: → Wdeprecated-volatile
Blocks: 1768117
See Also: 1768117
See Also: → Wenum-enum-conversion
No longer blocks: Wenum-float-conversion

This slide deck from a Google engineer details some of the problems (and fixes) found when updating Chrome from C++17 to C++20:

"C++20, How Hard Could It Be"
https://docs.google.com/presentation/d/1HwLNSyHxy203eptO9cbTmr7CH23sBGtTrfOmJf9n0ug/preview?resourcekey=0-GH5F3wdP7D4dmxvLdBaMvw

Chrome's C++20 meta bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=1284275

Depends on: 1794164
No longer depends on: 1794164

Thanks for working on this!

FYI, I don't expect we'd be able to actually switch to C++20 for a few years.

What are our unlisted blockers? Our good friends hazard-builds and android toolchains?

FWIW, we went c++17 on 2019-12-03, so it's we're neither really ahead nor behind our previous pace.

(In reply to Kelsey Gilbert [:jgilbert] from comment #4)

What are our unlisted blockers? Our good friends hazard-builds and android toolchains?

IIUC, we still need to support clang 5.0 for some older Linux distros, but I don't know which distros are blocking us today. There is some 2019 discussion in bug 1579189 comment 6 about clang support on Debian 8 and 9, though Sylvestre replied that clang versions up to 8 were available on Debian 8 at that time.

Depends on: 1800291
Depends on: 1800293
Depends on: 1800294
Depends on: 1832984
Depends on: 1851732
Depends on: 1853612
Depends on: 1855927
Blocks: 1855927
No longer depends on: 1855927
Depends on: 1860949
Depends on: 1863468
Depends on: 1878465
Depends on: 1878492
Depends on: 1880007
Depends on: 1880013
Depends on: 1880015
Depends on: 1880008
Blocks: 1880204
Blocks: C++23
Depends on: 1880779
Depends on: 1880917
No longer blocks: 1880204
Depends on: 1880776
Depends on: 1887580
You need to log in before you can comment on or make changes to this bug.