https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66290
--- Comment #4 from Lewis Hyatt <lhyatt at gcc dot gnu.org> --- OK, I understand now why done_lexing is necessary, plenty of places call back into libcpp after lexing, e.g. to interpret strings, and this may generate warnings. I think that one line patch is the way to go then. diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc index b9f01a65ed7..25a3c50de8e 100644 --- a/gcc/c-family/c-opts.cc +++ b/gcc/c-family/c-opts.cc @@ -1283,6 +1283,7 @@ c_common_finish (void) /* For performance, avoid tearing down cpplib's internal structures with cpp_destroy (). */ + done_lexing = false; cpp_finish (parse_in, deps_stream); if (deps_stream && deps_stream != out_stream && deps_stream != stdout