aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-01-28 23:35:20 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-01-28 23:35:20 +0100
commit4bda59463f7e470bbffb132fee9347e855639527 (patch)
tree749e265e10f3a4918fe27b31e63d406222d8c2bd
parentaec0b19e79f2b4b189b8d00a1f84d74cd91f460b (diff)
downloadgcc-4bda59463f7e470bbffb132fee9347e855639527.zip
gcc-4bda59463f7e470bbffb132fee9347e855639527.tar.gz
gcc-4bda59463f7e470bbffb132fee9347e855639527.tar.bz2
re PR pch/68176 (all pch tests fail on eglibc systems (with bits/predefs.h))
PR pch/68176 * files.c (_cpp_find_file): Set file->implicit_preinclude even if included from file->implicit_preinclude header. From-SVN: r232956
-rw-r--r--libcpp/ChangeLog4
-rw-r--r--libcpp/files.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 3a74d14..10d7197 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,5 +1,9 @@
2016-01-28 Jakub Jelinek <jakub@redhat.com>
+ PR pch/68176
+ * files.c (_cpp_find_file): Set file->implicit_preinclude even if
+ included from file->implicit_preinclude header.
+
* directives.c (destringize_and_run): Adjust prototype.
2016-01-27 David Malcolm <dmalcolm@redhat.com>
diff --git a/libcpp/files.c b/libcpp/files.c
index 22b1d05..5aa8d1a 100644
--- a/libcpp/files.c
+++ b/libcpp/files.c
@@ -522,7 +522,10 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir,
return entry->u.file;
file = make_cpp_file (pfile, start_dir, fname);
- file->implicit_preinclude = implicit_preinclude;
+ file->implicit_preinclude
+ = (implicit_preinclude
+ || (pfile->buffer
+ && pfile->buffer->file->implicit_preinclude));
/* Try each path in the include chain. */
for (; !fake ;)