https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116847

--- Comment #14 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #13)
> Created attachment 59202 [details]
> 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)).

No need, your -3 patch is OK with some function comments.

Reply via email to