summaryrefslogtreecommitdiff
path: root/libcpp/files.c
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-04 02:13:56 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-04 02:13:56 +0000
commitba841ef875de313d62028a0b3f8af3f006767142 (patch)
tree52c88aedd7f1c8d991064ad1952bd3983c447b8a /libcpp/files.c
parent9e45f419716a86e6892c802abdc45ea2a2aa65a9 (diff)
downloadgcc-ba841ef875de313d62028a0b3f8af3f006767142.tar.gz
Index: libcpp/ChangeLog
2005-01-03 Geoffrey Keating <geoffk@apple.com> * files.c (_cpp_find_file): Add files found by search_path_exhausted to the list of all files. Index: gcc/testsuite/ChangeLog 2005-01-03 Geoffrey Keating <geoffk@apple.com> Robert Bowdidge <bowdidge@apple.com> * gcc.dg/cpp/subframework1.c: New. * gcc.dg/cpp/frame/one.framework/Frameworks/OneSub.framework/Headers/A.h: New. * gcc.dg/cpp/frame/one.framework/Frameworks/OneSub.framework/Headers/B.h: New. * gcc.dg/cpp/frame/one.framework/Frameworks/OneSub.framework/Headers/C.h: New. * gcc.dg/cpp/frame/one.framework/Headers/one-includeSubs.h: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92883 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/files.c')
-rw-r--r--libcpp/files.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libcpp/files.c b/libcpp/files.c
index bd5f8dd5114..df5d9d7c972 100644
--- a/libcpp/files.c
+++ b/libcpp/files.c
@@ -438,7 +438,15 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir, bool f
if (file->dir == NULL)
{
if (search_path_exhausted (pfile, fname, file))
- return file;
+ {
+ /* Although this file must not go in the cache, because
+ the file found might depend on things (like the current file)
+ that aren't represented in the cache, it still has to go in
+ the list of all files so that #import works. */
+ file->next_file = pfile->all_files;
+ pfile->all_files = file;
+ return file;
+ }
open_file_failed (pfile, file);
if (invalid_pch)