mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-21 13:29:57 +08:00
re PR preprocessor/38987 (Including a precompiled header from another header causes invalid assembly to be generated)
2009-09-22 Richard Guenther <rguenther@suse.de> PR pch/38987 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion. From-SVN: r151970
This commit is contained in:
parent
f61e18ec67
commit
9a8a2b7a38
@ -1,3 +1,8 @@
|
||||
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:
|
||||
|
@ -288,6 +288,12 @@ pch_open_file (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user