https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114436
Lewis Hyatt <lhyatt at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2024-03-22 Status|UNCONFIRMED |NEW CC| |lhyatt at gcc dot gnu.org --- Comment #2 from Lewis Hyatt <lhyatt at gcc dot gnu.org> --- This should fix it correctly, will test it sometime. diff --git a/libcpp/directives.cc b/libcpp/directives.cc index 479f8c716e8..36cc762e704 100644 --- a/libcpp/directives.cc +++ b/libcpp/directives.cc @@ -1986,7 +1986,9 @@ destringize_and_run (cpp_reader *pfile, const cpp_string *in, /* Finish inlining run_directive. */ pfile->buffer->file = NULL; + const auto new_sysp = pfile->buffer->sysp; _cpp_pop_buffer (pfile); + pfile->buffer->sysp = new_sysp; /* Reset the old macro state before ... */ XDELETE (pfile->context);