https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116847
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59201|0 |1 is obsolete| | --- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 59202 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59202&action=edit gcc15-pr116847-3.patch This seems to work on quick testing (just pch.exp so far). > I was thinking just history, we don't need to handle push in a PCH and pop > after it. If people don't do it, then all the patch does is writes an extra 32-bit 0 and reads it back. But if people do something like that, the state could become inconsistent, and just saving/restoring it IMHO is easier than diagnosing issues like that. But if you strongly prefer, I can add a sorry if (!m_push_list.empty_p ()) during PCH save and otherwise ignore that vector (or error but then we'd need to document it; but would it be an error just for PCH saved headers if they have more pushes than pops, or should we check the balances on every single header (then it would need more infrastructure)).