egcs, RFC: patch for possible -Wmissing-noreturn warning
John Carr
jfc@mit.edu
Tue Oct 13 19:22:00 GMT 1998
> There are three possible cases:
> ...
> [3] Functions that contain jumps and don't fall into the previous category.
> Since the Halting Problem is uncomputable, you cannot tell whether they
> return or not which makes warnings of this case impossible.
The halting problem says that given an infinite system you can't write
a perfect theorem prover. It doesn't say that you can't get most
cases right. (It also doesn't apply to finite systems where it is
possible to enumerate all the possible states, but that's not an
important exception here.)
gcc needs to be careful with return/noreturn warnings because there
are three states, not two (like IEEE compares), but it should be
possible to arrange that:
1. every return/noreturn warning is correct
2. most functions which should have warnings get them
More information about the Gcc
mailing list