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]
Other format: [Raw text]

Re: PCH not being used, but I can't tell why


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.

-- 
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
    - Brian W. Kernighan


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