http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58689
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #2) > Well, guess the warning could have many false positives. Not more than the other -Wsuggest-attribute= warnings, no? I don't see how it could be wrong. Sure you may not want to add the attribute, but if gcc says the return is non-0, it is. > Anyway, if you code for such warning, you could as well just assume the > attribute on the functions Ah, ok, that's different from what I was suggesting, but potentially more interesting. > and if you set it before IPA, perhaps you could > even propagate it during IPA, then functions can make use of those. IPA is early I think? You need at least VRP1 to detect a non-0 return, and possibly you would need to alternate between IPA and VRP to propagate through functions.