https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108416
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |104077 Keywords| |diagnostic Component|c++ |tree-optimization --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Hmm, I am think the warning is correct. Rather the warning should be there for when cout is uncommented. Most likely inlining changes and that is why the warning goes away. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104077 [Bug 104077] [meta-bug] bogus/missing -Wdangling-pointer