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]

Re: PCH, and more generally C++ parser performance


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

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