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 09:40:00 +0200
User-agent: KNode/0.10.4

Hello,

 gutmant@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



reply via email to

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