https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97573
Bug ID: 97573 Summary: Implement C++20 [depr.arith.conv.enum] Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- P1120R0 added various deprecations, see [depr.arith.conv.enum]: enum E1 { e }; enum E2 { f }; bool b = e <= 3.7; // deprecated int k = f - e; // deprecated but we don't warn for this, not even with -Wdeprecated -Wenum-compare -Wfloat-conversion -Wfloat-equal -Wpedantic -Wall -Wextra etc. In C++20, this should warn by default. -Wenum-conversion is currently only valid for C, but that should change, so that we can warn on the code above in C++17 too.