HomePhabricator

[c++20] Add deprecation warnings for the expression forms deprecated by P1120R0.

Authored by rsmith on Dec 16 2019, 3:17 PM.

Description

[c++20] Add deprecation warnings for the expression forms deprecated by P1120R0.

This covers:

  • usual arithmetic conversions (comparisons, arithmetic, conditionals) between different enumeration types
  • usual arithmetic conversions between enums and floating-point types
  • comparisons between two operands of array type

The deprecation warnings are on-by-default (in C++20 compilations); it
seems likely that these forms will become ill-formed in C++23, so
warning on them now by default seems wise.

For the first two bullets, off-by-default warnings were also added for
all the cases where we didn't already have warnings (covering language
modes prior to C++20). These warnings are in subgroups of the existing
-Wenum-conversion (except that the first case is not warned on if either
enumeration type is anonymous, consistent with our existing
-Wenum-conversion warnings).

Details

Committed
rsmithDec 16 2019, 5:49 PM
Parents
rG434905b97d96: Run all threads when extending a next range over a call.
Branches
Unknown
Tags
Unknown