This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [OT] Identifying unused include directives?
- From: dewar at gnat dot com (Robert Dewar)
- To: dkegel at ixiacom dot com, gcc at gcc dot gnu dot org
- Date: Fri, 29 Aug 2003 21:22:13 -0400 (EDT)
- Subject: Re: [OT] Identifying unused include directives?
> Anyone know a good way to automatically identify unneeded #include statements?Seems like this is something gcc could do...
The general case seems impossible to solve (indeed it is trivially equivalent
to the halting problem whether a given #include affects the semantics of
a given program). So the first job is to define exactly what the scope
of the task is, and this seems pretty difficult.