------- Comment #2 from manu at gcc dot gnu dot org  2010-06-13 13:49 -------
(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?


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44511

Reply via email to