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] |
I spent some time on PR 15933 yesterday and determined that a proper fix is too hard for the amount of time I have right now. Therefore, I'm checking in the following patch, which backs out part of the change that caused the bug. I don't consider it a proper fix because it causes the multiple-include-with-guard-macro optimization to become less effective. That's "merely" a performance issue, though. The case the MI optimization now misses is where a file is found first from the normal search path, and then a second time from directory-of- the-current-file search. I believe I know how to fix this, but as I said, it's more complicated than I have time for. Bootstrapped i686-linux, no apparent regressions. Unfortunately I do not see a practical way to put the test case from the PR into the testsuite; we can't drop a file named "limits.h" into gcc.dg/cpp without breaking other test cases in that directory. Ideas appreciated. zw libcpp: PR 15933 Partially revert patch of 2004-06-05. * files.c (search_cache): Remove pfile argument. Don't check for file that would be found by "" or <> search here... (_cpp_find_file): ...do it here, before calling find_file_in_dir. Do not apply directory-of-current-file correction to files found by this check. Rearrange code slightly.
Attachment:
files.c.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |