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: gutmant
Subject: Re: The g++ preprocessor: Include Guards
Date: Thu, 21 Jun 2007 07:56:46 -0000
User-agent: G2/1.0

On Jun 21, 10:40 am, Bernd Strieder <strie...@informatik.uni-kl.de>
wrote:
> Hello,
>
>  gutm...@gmail.com wrote:
> > What I need is to build (script wise) a reliable inclusion tree.
> > I already have the code (py) to do that, but that relies on the
> > preprocessor's output, so the result ends up partial.
> > While exploring this issue, I realized that the problem is this
> > optimization, and now I'm wondering if I can work around it without
> > changing the source files.
>
> Ah, then you will probably have to parse yourself. This is what e.g.
> doxygen does, in fact it does its own preprocessing, and it creates an
> inclusion tree among lots of other useful things. You could take the
> source of the preprocessor cpp, and remove that optimization, or
> perhaps just use a very old release.
>
> 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.
Parsing is not a problem, we've been give python for that ;)
Does doxygen build the partial or the full inclusion tree? (meaning,
does it discard the additional includes past the first one? )
Thanks,
 - Tali



reply via email to

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