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]
Other format: [Raw text]

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.


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