https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116847
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #10) > Created attachment 59200 [details] > gcc15-pr116847-1.patch > > Apparently diagnostic.h already uses auto_vec in one spot. So for now here > is a cleanup patch which uses vectors in two spots instead of the hand > managed arrays (with the advantage of exponential reallocation rather than > linear). LGTM. (In reply to Jakub Jelinek from comment #11) > Created attachment 59201 [details] > gcc15-pr116847-2.patch > > Untested fix on top of the previous patch. > Unfortunately it regresses > FAIL: g++.dg/pch/line-map-3.C -g -I. -Dwith_PCH dg-regexp 23 not found: > "[^[:space:]]*: some warnings being treated as errors" > The thing is that by saving/restoring m_classify_diagnostic array in > addition to the history, we restore with PCH restore the -Werror=someoption > -Wno-error=someotheroption state from the PCH saving command line and ignore > the current one. So perhaps I should just save the other vectors > (history/push_list). I was thinking just history, we don't need to handle push in a PCH and pop after it.