------- Comment #3 from rguenth at gcc dot gnu dot org 2010-06-13 14:18 ------- (In reply to comment #2) > (In reply to comment #1) > > > > instead. So the warning you see is really warning about no return > > statement, > > not about control reaching the end of a non-void function. And it does so > > by design just for functions with static linkage. > > > > So I'd say the warning is not false, it is just not useful for the case > > where the function does not return at all. > > > > Leaving the bug as enhancement request instead of closing as > > wontfix/invalid. > > > > I don't see how one can detect that the function does not return from the FE, > so I don't think this is possible to implement without moving the warning to > the middle-end. Perhaps we should not care about unused static functions and > remove this warning altogether. > > What happens if the static function actually returns and is used? Do you get 2 > warnings?
No, the Frontend sets TREE_NO_WARNING after it issued the warning. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44511