]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR pch/68176
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Jan 2016 22:35:20 +0000 (22:35 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Jan 2016 22:35:20 +0000 (22:35 +0000)
* files.c (_cpp_find_file): Set file->implicit_preinclude even if
included from file->implicit_preinclude header.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232956 138bc75d-0d04-0410-961f-82ee72b054a4

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 ;)