This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Super Lint (was: Unexecutable Stack / Buffer Overflow Exploits...)


Undecidability simply means that any correct program that attempts to
do certain kinds of analysis must return a three-valued answer: yes,
no, or "I can't tell".  gcc is already full of code that attempts to
solve undecidable problems: warning about code that will never be
reached, or warning about using variables before they are initialized,
is one obvious example:

	CODE;
	STATEMENT;

STATEMENT is reached iff CODE halts, so we must solve the halting problem
to tell, in general, which statements can be reached.  If STATEMENT uses a
variable that is not set, then we can't write a perfect -Winitialized
without solving the halting problem.

Yet we have a useful -Winitialized anyway; it warns in the "I can't tell"
cases as well as in the "yes" cases.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]