This is the mail archive of the gcc-patches@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]

Fwd: #import and pch not working well


Odd, the archive doesn't have the email (anymore?), bad archive! Here it is...

Begin forwarded message:

From: Mike Stump <mrs@apple.com>
Date: February 2, 2005 5:58:46 PM PST
To: Geoffrey Keating <geoffk@geoffk.org>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: #import and pch not working well
On Feb 2, 2005, at 1:57 PM, Geoffrey Keating wrote:
This is good, except for this part:
- if (h->start_dir != NULL && h->u.file->stack_count != 0)
(which you helpfully pointed me at in private mail).
It's wrong for two reasons:
- If start_dir is NULL, then this is a directory, not a file, and we
  might not be able to open() it, which would lead to a spurious error.
all_files doesn't include directories, so, effectively, this hasn't been removed.
- If stack_count is 0, that means the file was never actually read,
  and so it shouldn't affect later #imports.
Ok... I tried the testcase with the stack_count check and it worked fine, so that isn't necessary, all_files is enough.
Ok?

Attachment: pch-import-fsf-a.diffs.txt
Description: Text document



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