The project I work on have things like the following:
enum SomeType {
value_100 = 100,
reserved_101 = 101,
value_102 = 102
};
The presence of these 'reserved' identifiers, is not something the powers to be are willing to change.
I would like to adorn them somehow, something similar to
[[maybe_unused]]
, so I can turn on -Werror=switch
This is a huge (and old) codebase, refactor to not use switches would be a major undertaking, not something on the table right now.
Is there some way to selectively silence warnings regarding unhandled enumeration values in gcc? Note that I still want the warnings for enumeration values not so adorned. Using a gcc extension would be ok.