re PR pch/68176 (all pch tests fail on eglibc systems (with bits/predefs.h))
authorJakub Jelinek <jakub@redhat.com>
Thu, 28 Jan 2016 22:35:20 +0000 (23:35 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 28 Jan 2016 22:35:20 +0000 (23:35 +0100)
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
libcpp/files.c

index 3a74d14d6d15a7fff9cc24ac17077b429911e376..10d71977d29f88b7566d9f4e96de009217b522a4 100644 (file)
@@ -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>
index 22b1d05b223d14768eb60310eeb11530f7168f06..5aa8d1ac9bbec5352990b8a777b7858edf4e451d 100644 (file)
@@ -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 ;)