Remove switch case fallthrough
Patrick Schluter
Patrick.Schluter at bbox.fr
Fri May 14 10:25:07 UTC 2021
On Friday, 14 May 2021 at 06:56:55 UTC, Mike Parker wrote:
> On Friday, 14 May 2021 at 06:21:10 UTC, rempas wrote:
>>
>>
>> Yeah but we have to add "break" every time? No ones uses this
>> feature anymore (thus the warnings) because we can add more
>> cases. This is what I mean by saying "doing things just to do
>> them". While I agree that code that looks like C should act
>> like C but I think we can make one exception here! But anyway
>> just my opinion
>
> But C supports implicit fallthrough, so by deprecating it, we
> did make an exception. Ans it's a good exception to make.
And even C compilers warn now about implicit fallthrough (gcc
since version 8 with -Wall).
More information about the Digitalmars-d
mailing list