https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105705
--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> --- On Tue, 24 May 2022, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105705 > > --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- > The warning started to be given without -Wsystem-headers with r12-1992 > > It was already present with -Wsystem-headers, but suppressed by default. Skimming that it looks for whether the inline stack contains _only_ system headers now which means that any system header content inlined into user code will now be warned on without -Wsystem-header. That might be OK if the system header code is just abstraction but for more complicated code it's going to expose details not helpful to the user. We might want to change this to set m_allsyslocs to true if the "tail" of the inline stack is in system header which boils down to asking it for the original location - the intent wasn't to do extra suppression (like for user code inlined into system header context) but to expose more code to diagnostics which we are not ready to do [in late diagnostics at least].