This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PCH, and more generally C++ parser performance
- To: Joe Buck <jbuck at racerx dot synopsys dot com>
- Subject: Re: PCH, and more generally C++ parser performance
- From: Stan Shebs <shebs at apple dot com>
- Date: Tue, 29 Aug 2000 18:28:24 -0700
- CC: Geoff Keating <geoffk at cygnus dot com>, Zack Weinberg <zack at wolery dot cumb dot org>, gcc at gcc dot gnu dot org
- References: <200008300031.RAA25546@racerx.synopsys.com>
Joe Buck wrote:
>
> > #include <everything.h>
> > int foo (int bar)
> > {
> > bar = f(g(i<3>));
> > }
> >
> > then during parsing, everything relating to "foo", "bar", "f", "g",
> > "i" gets loaded from a pre-compiled header file, as are their types
> > and so on.
>
> The only complication I can think of is that
> #include <everything.h>
> may also instantiate a static file-scope object that has a constructor.
In Apple's scheme, anything that is static gets put out unconditionally,
as do pragmas (another reason to hate pragmas). For extra flavor, the
preprocessor warns you about any static objects it sees while it is
constructing the precomp file.
Stan