On Fri, 2024-09-27 at 10:23 -0400, David Malcolm wrote: > On Fri, 2024-09-27 at 09:54 -0400, Lewis Hyatt wrote: > > On Fri, Sep 27, 2024 at 9:41 AM David Malcolm <dmalc...@redhat.com> > > wrote: > > > > > > On Thu, 2024-09-26 at 23:28 +0200, Jakub Jelinek wrote: > > > > Hi! > > > > > > > > The following patch on top of the just posted cleanup patch > > > > saves/restores the m_classification_history and m_push_list > > > > vectors for PCH. Without that as the testcase shows during > > > > parsing > > > > of the templates we don't report ignored diagnostics, but after > > > > loading > > > > PCH header when instantiating those templates those warnings > > > > can > > > > be > > > > emitted. This doesn't show up on x86_64-linux build because > > > > configure > > > > injects there -fcf-protection -mshstk flags during library > > > > build > > > > (and > > > > so > > > > also during PCH header creation), but make check doesn't use > > > > those > > > > flags > > > > and so the PCH header is ignored. > > > > > > > > Bootstrapped on i686-linux so far, bootstrap/regtest on x86_64- > > > > linux > > > > and > > > > i686-linux still pending, ok for trunk if it passes it? > > > > > > Thanks, yes please > > > > > > Dave > > > > > > > A couple comments that may be helpful... > > > > -This is also PR 64117 > > (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64117) > > > > -I submitted a patch last year for that but did not get any > > response > > ( > > https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635648.html > > ). > > I guess I never pinged it because I am still trying to ping two > > other > > ones :). > > Gahhh, I'm sorry about this. > > What are the other two patches? > > > My patch did not switch to vec so it was not as nice as this > > one. I wonder though, if some of the testcases I added could be > > incorporated? In particular the testcase from my patch > > pragma-diagnostic-3.C I believe will still be failing after this > > one. > > There is an issue with C++ because it processes the pragmas twice, > > once in early mode and once in normal mode, that makes it do the > > wrong > > thing for this case: > > > > t.h: > > ---- > > #pragma GCC diagnostic push > > #pragma GCC diagnostic ignored... > > //no pop at end of the file > > > > t.c > > ---- > > #include "t.h" > > #pragma GCC diagnostic pop > > //expect to be at the initial state here, but won't be if t.h is a > > PCH > > > > In my patch I had separated the PCH restore from a more general > > "state > > restore" logic so that the C++ frontend can restore the state after > > the first pass through the data. > > It sounds like the ideal here would be to incorporate the test cases > from Lewis's patch into Jakub's, if the latter can be tweaked to fix > pragma-diagnostic-3.C
...and I see that Jakub has pushed his patch (as https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=64072e60b1599ae7d347c2cdee46c3b0e37fc338 so is there a way to do Lewis's patch on top of that? Sorry about this Dave