Fix and re-enable C++20 -Wanon-enum-enum-conversion warnings
Categories
(Firefox Build System :: General, task, P3)
Tracking
(Not tracked)
People
(Reporter: cpeterson, Unassigned)
References
(Blocks 1 open bug)
Details
C++20 deprecates some operations between anonymous enum types:
enum { ONE = 1 };
enum { TWO = 2 };
ONE | TWO; // warning: bitwise operation between different enumeration types ('(unnamed enum at a.cpp:8:3)' and '(unnamed enum at a.cpp:9:3)') [-Wanon-enum-enum-conversion]
https://clang.llvm.org/docs/DiagnosticsReference.html#wanon-enum-enum-conversion
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Comment 1•3 years ago
|
||
These -Wanon-enum-enum-conversion warnings neither block nor depend on updating to C++20 because they were downgraded from errors to warnings in bug 1781001.
Comment 2•1 year ago
|
||
The meta keyword is there, the bug doesn't depend on other bugs and there is no activity for 12 months.
:ahochheiden, maybe it's time to close this bug?
| Reporter | ||
Comment 3•1 year ago
|
||
I removed the meta keyword for now. This meta bug is a reminder that these C++20 warnings will exist when we eventually compile with -std=c++20.
| Reporter | ||
Comment 4•1 year ago
|
||
C++20 introduced these -Wanon-enum-enum-conversion warnings and C++26 made them errors:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2864r2.pdf
Description
•