https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109559
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Unexpected |[12/13/14 Regression] |-Wmaybe-uninitialized |Unexpected |warning when inlining with |-Wmaybe-uninitialized |system header |warning when inlining with | |system header Keywords| |diagnostic Target Milestone|--- |12.3 --- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Started with r12-1992. We have an inlining context containing locations for each call site along the inlining stack: struct inlining_info. It has a stack of locations, and a flag that says whether all of them come from a system header. If so, we don't warn: 1548 if (!report_warning_p && diagnostic->m_iinfo.m_allsyslocs) 1549 /* Bail if the warning is not to be reported because all locations 1550 in the inlining stack (if there is one) are in system headers. */ 1551 return false; but in this test diagnostic->m_iinfo.m_allsyslocs is false because the inlining causes that the outermost context is the un.cc file, which is not a system header. It looks like this is a failure to propagate the sysp flag when inlining a function.