This is the mail archive of the
mailing list for the GCC project.
Re: RFC: Killing "no return statement in function returning non-void"
On Sun, Jun 19, 2005 at 12:20:23PM -0600, Roger Sayle wrote:
> As stevenb pointed out, it's prohibitive to fully process every function
> due to the huge number of unused functions in system headers etc...
> The solution I proposed was something like -fforce-used to enable extra
> checking explicitly on the command line. pinskia then made the excellent
> suggestion that this is what -fkeep-inline-functions should be doing,
> until we discovered that flag_keep_inline_functions isn't currently used
> in the gcc/ directory!
I think that -Wall (or appropriate sub-switches) should force functions
to be lowered to the cfg stage, at which point we perform these warnings.
Then we can discard the function without further processing. It's a
little bit of overhead, but the user did in fact ask for it.