* [PATCH] Fix PCH on systems where stdc-predef.h includes other headers (PR pch/68176)
@ 2016-01-28 14:32 Jakub Jelinek
2016-01-28 22:17 ` Marek Polacek
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2016-01-28 14:32 UTC (permalink / raw)
To: Joseph S. Myers, Marek Polacek, Dodji Seketeli; +Cc: gcc-patches
Hi!
As mentioned in the PR, most of the pch tests fail if stdc-predef.h header
includes other headers. I don't have such a system, but changed my
stdc-predef.h to include a dummy header bits/predef.h and this patch fixes
all the tests that failed because of that.
AFAIK file->implicit_preinclude flag is used solely for the PCH purposes,
and this patch makes sure that headers included from implicit_preinclude
headers are also implicit_preinclude.
Bootstrapped/regtested on x86_64-linux, ok for trunk?
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.
--- libcpp/files.c.jj 2016-01-08 07:42:49.000000000 +0100
+++ libcpp/files.c 2016-01-28 09:53:06.569750380 +0100
@@ -522,7 +522,10 @@ _cpp_find_file (cpp_reader *pfile, const
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 ;)
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix PCH on systems where stdc-predef.h includes other headers (PR pch/68176)
2016-01-28 14:32 [PATCH] Fix PCH on systems where stdc-predef.h includes other headers (PR pch/68176) Jakub Jelinek
@ 2016-01-28 22:17 ` Marek Polacek
0 siblings, 0 replies; 2+ messages in thread
From: Marek Polacek @ 2016-01-28 22:17 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Joseph S. Myers, Dodji Seketeli, gcc-patches
On Thu, Jan 28, 2016 at 03:32:39PM +0100, Jakub Jelinek wrote:
> Hi!
>
> As mentioned in the PR, most of the pch tests fail if stdc-predef.h header
> includes other headers. I don't have such a system, but changed my
> stdc-predef.h to include a dummy header bits/predef.h and this patch fixes
> all the tests that failed because of that.
> AFAIK file->implicit_preinclude flag is used solely for the PCH purposes,
> and this patch makes sure that headers included from implicit_preinclude
> headers are also implicit_preinclude.
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
> 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.
Ok.
Marek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-28 22:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-28 14:32 [PATCH] Fix PCH on systems where stdc-predef.h includes other headers (PR pch/68176) Jakub Jelinek
2016-01-28 22:17 ` Marek Polacek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).