Re: [PATCH] c++: Deprecate arithmetic convs on different enums [PR97573]

2020-10-29 Thread Jason Merrill via Gcc-patches
On 10/28/20 10:46 PM, Marek Polacek wrote: On Wed, Oct 28, 2020 at 02:43:30PM -0400, Jason Merrill wrote: On 10/28/20 2:01 PM, Marek Polacek wrote: I noticed that C++20 P1120R0 deprecated certain arithmetic conversions as outlined in [depr.arith.conv.enum], but we don't warn about them. In par

Re: [PATCH] c++: Deprecate arithmetic convs on different enums [PR97573]

2020-10-28 Thread Marek Polacek via Gcc-patches
On Wed, Oct 28, 2020 at 02:43:30PM -0400, Jason Merrill wrote: > On 10/28/20 2:01 PM, Marek Polacek wrote: > > I noticed that C++20 P1120R0 deprecated certain arithmetic conversions > > as outlined in [depr.arith.conv.enum], but we don't warn about them. In > > particular, "If one operand is of en

Re: [PATCH] c++: Deprecate arithmetic convs on different enums [PR97573]

2020-10-28 Thread Jason Merrill via Gcc-patches
On 10/28/20 2:01 PM, Marek Polacek wrote: I noticed that C++20 P1120R0 deprecated certain arithmetic conversions as outlined in [depr.arith.conv.enum], but we don't warn about them. In particular, "If one operand is of enumeration type and the other operand is of a different enumeration type or

[PATCH] c++: Deprecate arithmetic convs on different enums [PR97573]

2020-10-28 Thread Marek Polacek via Gcc-patches
I noticed that C++20 P1120R0 deprecated certain arithmetic conversions as outlined in [depr.arith.conv.enum], but we don't warn about them. In particular, "If one operand is of enumeration type and the other operand is of a different enumeration type or a floating-point type, this behavior is depr