This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PCH not being used, but I can't tell why
> Date: Mon, 18 Aug 2003 14:20:30 -0400
> From: Phil Edwards <phil@jaj.com>
> one week ago, Phil Edwards wrote:
> > On Mon, Aug 11, 2003 at 11:48:10PM -0700, Geoff Keating wrote:
> > >
> > > > Resetting the pch status flag seems necessary. The skipping of "." and
> > > > ".." isn't needed for correctness as long as the flag is reset, but it does
> > > > speed things up a tad. I don't know cpplib, maybe there's some abstracted
> > > > test that should be used instead of strcmp against string literals, but
> > > > this is the essence of what needs to be done in pch_open_file():
> > >
> > > Even this isn't enough; it's possible for a directory to have some
> > > files that are "never valid" and others that are valid. What has to
> > > happen is that the changes to '->pch' are moved into the outer loop.
> >
> > There's only one loop in pch_open_file. There aren't any loops in the
> > function that calls it. There's a loop in the function that calls the
> > function that calls pch_open_file, but I don't know where in that loop
> > you want the flag reset.
>
> So, should I make a guess and propose more patches? Can I have some hints?
The flag should not be 'reset'. It should be set, once, correctly, in
pch_open_file and not in validate_pch, probably by having validate_pch
return the flag value as it applies to this particular file and having
pch_open_file combine the results for all the files it looks at in any
particular call.
The loop to which I referred is indeed the only loop in pch_open_file.
--
- Geoffrey Keating <geoffk@geoffk.org>
- References:
- Re: PCH not being used, but I can't tell why
- Re: PCH not being used, but I can't tell why
- Re: PCH not being used, but I can't tell why
- Re: PCH not being used, but I can't tell why
- Re: PCH not being used, but I can't tell why
- Re: PCH not being used, but I can't tell why
- Re: PCH not being used, but I can't tell why
- Re: PCH not being used, but I can't tell why
- Re: PCH not being used, but I can't tell why
- Re: PCH not being used, but I can't tell why