diff options
author | Andre Vehreschild <vehre@gmx.de> | 2015-04-14 15:58:19 +0200 |
---|---|---|
committer | Andre Vehreschild <vehre@gmx.de> | 2015-04-14 15:58:19 +0200 |
commit | 93165dbdfd0406ae43d6dda7cb358fb8c1fcbad7 (patch) | |
tree | 69186c5617ba843643a58bafef5b351f811391c6 /libcpp/files.c | |
parent | b70cd7cb6fd66a6f5dfbfb988861cec47c6e2c7a (diff) | |
parent | 33a2aaa4b5b40e1d705587d8fb669473263baff3 (diff) | |
download | gcc-vehre/base.tar.gz |
Merge remote-tracking branch 'trunk' of git://gcc.gnu.org/git/gcc into vehre/allvehre/base
Diffstat (limited to 'libcpp/files.c')
-rw-r--r-- | libcpp/files.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libcpp/files.c b/libcpp/files.c index a995071ad06..2f491224c6f 100644 --- a/libcpp/files.c +++ b/libcpp/files.c @@ -291,11 +291,13 @@ pch_open_file (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch) /* If the file is not included as first include from either the toplevel file or the command-line it is not a valid use of PCH. */ - if (pfile->all_files - && pfile->all_files->next_file - && !(pfile->all_files->implicit_preinclude - || pfile->all_files->next_file->implicit_preinclude)) - return false; + for (_cpp_file *f = pfile->all_files; f; f = f->next_file) + if (f->implicit_preinclude) + continue; + else if (f->main_file) + break; + else + return false; flen = strlen (path); len = flen + sizeof (extension); |