This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This change fixes the compiler's ability to use the correct precompiled header out of a directory, which stopped working with recent changes to the PCH code. We now must reset the PCH state of the _cpp_file object that's being used to try each entry in the directory "bits/stdc++.h.gch" for the use of -include bits/stdc++.h on the command line. The pch_open_file() while loop's first attempt, on "/some/dir/.", will fail and thus cause file->pch to be set to 2; without this change, all subsequent tries, including "/some/dir/O0g", will not be properly visited by validate_pch because it'll see the flag set to 2, meaning the file (even though it was concerning a previous one) is not and never will be a valid precompiled header. Hope this helps, B -- Brendan Kehoe brendan@zen.org http://www.zen.org/~brendan/
Attachment:
diffs-fixpch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |