help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The g++ preprocessor: Include Guards


From: Bernd Strieder
Subject: Re: The g++ preprocessor: Include Guards
Date: Thu, 21 Jun 2007 14:31:46 +0200
User-agent: KNode/0.10.4

Hello,

 gutmant@gmail.com wrote:

> On Jun 21, 10:40 am, Bernd Strieder <strie...@informatik.uni-kl.de>
> wrote:
>>
>> What I would like is a tool to find header files included
>> unnecessarily, or those with the majority of no use where included.
>> But this requires parsing, since it has to do even more than a
>> compiler. The inclusion tree itself is not of too much interest for
>> me, it's just a consequence of the necessary #includes.
>>
>> Bernd Strieder
> 
> And of the unnecessary, if you remove the optimization.

Do I understand that correctly? You need that complete inclusion tree to
e.g. allow the programmer to optimize the includes manually, so
basically the optimization is not needed anymore, after that.

> Parsing is not a problem, we've been give python for that ;)

So you think parsing or preprocessing C or even C++ is simple, then good
luck.

> Does doxygen build the partial or the full inclusion tree? (meaning,
> does it discard the additional includes past the first one? )

It generates a more or less local tree for every file with clickable
links, so basically it generates a distributed inclusion DAG.
Additionally it generates the reverse information as well, which other
files include the particular header, indirectly.

I think full inclusion DAGs are pretty hard to display, because there
will be too many crossings of the edges in general, so they are of
limited use, anyway. For visible display local graphs will be of much
more interest.

Bernd Strieder





reply via email to

[Prev in Thread] Current Thread [Next in Thread]