Remove switch case fallthrough

Patrick Schluter Patrick.Schluter at bbox.fr
Fri May 14 10:28:31 UTC 2021


On Friday, 14 May 2021 at 08:37:19 UTC, Mike Parker wrote:
> On Friday, 14 May 2021 at 08:24:46 UTC, Paulo Pinto wrote:
> ines.md#es78-dont-rely-on-implicit-fallthrough-in-switch-statements
>>
>> Additionally, since C++17, there is the fallthrough attribute 
>> to be explicit that the C behaviour is actually intended.
>>
>> https://en.cppreference.com/w/cpp/language/attributes/fallthrough
>
> Man that's ugly. I like our `goto case` better.

In C gcc uses comments to silence the warning.

```
case 5: ...
/* falltrough */
case 6: ...
```




More information about the Digitalmars-d mailing list