https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87544
--- Comment #17 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Martin Sebor from comment #16) > The warning code considers just the argument to the call. It doesn't know > (and in the constant case can't tell) where the argument came from. It > would need to be reworked to tell the difference (e.g., along the lines of > -Wmaybe-uninitialized). It might be worth looking into at some point. In doubt, it would be possible to add "maybe" to the warning even in cases where it certainly does it. Otherwise, uninit's always_executed (check post-domination between function entry and the basic block of the instruction) is a simple 1-line check that allows to add 'maybe' only in some cases.