PR pch/38987
* files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151970
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-09-22 Richard Guenther <rguenther@suse.de>
+
+ PR pch/38987
+ * files.c (pch_open_file): Disallow non-toplevel PCH inclusion.
+
2009-09-18 Chris Demetriou <cgd@google.com>
PR preprocessor/28435:
if (file->name[0] == '\0' || !pfile->cb.valid_pch)
return false;
+ /* 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)
+ return false;
+
flen = strlen (path);
len = flen + sizeof (extension);
pchname = XNEWVEC (char, len);