On Thu, Oct 10, 2019 at 08:24:29AM -0400, Nathan Sidwell wrote: > In addressing 91770, I need to emit a warning for a location inside a system > header file[1]. The diagnostics machinery elides warnings when the location > is in a system header :( > > As I happen to have located the appropriate line_map in the process of > determining the nested extern "C", I could clear the map's in-system-header > flag around the warning emission. But that's, well, urgh:( > > Is there a neater way?
bool save_warn_system_headers = global_dc->dc_warn_system_headers; global_dc->dc_warn_system_headers = 1; ... global_dc->dc_warn_system_headers = save_warn_system_headers; ? I'm afraid warning_sentinel can't be used here, because that clears, rather than sets it. Jakub