[Bug preprocessor/93306] Unnecessary file I/O done for #if 0 && __has_include(...)
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 17 13:50:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93306
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>:
https://gcc.gnu.org/g:bf09d886a4be1031f7003073115af6cbc5575353
commit r10-6040-gbf09d886a4be1031f7003073115af6cbc5575353
Author: Nathan Sidwell <nathan@acm.org>
Date: Fri Jan 17 05:39:47 2020 -0800
[PR93306] Short-circuit has_include
the preprocessor evaluator has a skip_eval counter, but we weren't
checking it after parsing has_include(foo), but before looking for
foo. Resulting in unnecessary io for 'FALSE_COND && has_include <foo>'
PR preprocessor/93306
* expr.c (parse_has_include): Refactor. Check skip_eval before
looking.
More information about the Gcc-bugs
mailing list