Closed bonki closed 2 years ago
I have merged this for now.
@mooskagh, I tried your code.
In Dev-C++ I need one more check:
#ifdef __has_c_attribute
#if __has_c_attribute(fallthrough)
[[fallthrough]];
#endif
#endif
Instead of checking this every time, I think it would be better to define a macro which expands to [[fallthrough]]
if it's supported, or to nothing otherwise.
Instead of checking this every time, I think it would be better to define a macro which expands to
[[fallthrough]]
if it's supported, or to nothing otherwise.
Here is it on a new branch: 96dfb3d2e3970b7495efd81ba7fde1ad8a16149d
Indeed, and
gcc
already has a non-standard attribute for this as well (not sure if this is true forclang
in C-mode). I just picked what's already in use as a marker to be consistent with the rest of the current code base.