Hi Marek, Nice warning! Just to confirm, would the patch warn with code like:
const char * target_xfer_status_to_string (enum target_xfer_status status) { #define CASE(X) case X: return #X switch (status) { CASE(TARGET_XFER_E_IO); CASE(TARGET_XFER_UNAVAILABLE); default: return "<unknown>"; } #undef CASE }; ? I think it shouldn't, but I couldn't tell from the tests, and the only similar instance I found in gcc is guarded behind an #ifdef (in eh_data_format_name). Thanks, Pedro Alves