From 4bda59463f7e470bbffb132fee9347e855639527 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 28 Jan 2016 23:35:20 +0100 Subject: [PATCH] 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 --- libcpp/ChangeLog | 4 ++++ libcpp/files.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 3a74d14d6d15..10d71977d29f 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,5 +1,9 @@ 2016-01-28 Jakub Jelinek + 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 diff --git a/libcpp/files.c b/libcpp/files.c index 22b1d05b223d..5aa8d1ac9bbe 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 ;)