https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127470
--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> --- (In reply to Ivan Lazaric from comment #2) > What most surprised me is that it didn't show up in optimized builds > when only declaration of function is available. > > https://godbolt.org/z/rxv819474 Because with the definition with optimizations; it gets inlined before the warning. Anyways this warning should almost positively removed since it is a false positive haven. There is another bug for a similar reason. I can't find it right now.
