aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-09-27 16:07:40 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2024-09-27 16:07:40 +0200
commit64072e60b1599ae7d347c2cdee46c3b0e37fc338 (patch)
tree4ab233a209c4ce21a2d155b33e1634d997888f63 /gcc/java
parentddc72ba6c6c2c84a1a95340840bd5fde1f2bde44 (diff)
downloadgcc-64072e60b1599ae7d347c2cdee46c3b0e37fc338.zip
gcc-64072e60b1599ae7d347c2cdee46c3b0e37fc338.tar.gz
gcc-64072e60b1599ae7d347c2cdee46c3b0e37fc338.tar.bz2
diagnostic: Save/restore diagnostic context history and push/pop state for PCH [PR116847]
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. 2024-09-26 Jakub Jelinek <jakub@redhat.com> PR libstdc++/116847 gcc/ * diagnostic.h (diagnostic_option_classifier): Add pch_save and pch_restore method declarations. (diagnostic_context): Add pch_save and pch_restore inline method definitions. * diagnostic.cc (diagnostic_option_classifier::pch_save): New method. (diagnostic_option_classifier::pch_restore): Likewise. gcc/c-family/ * c-pch.cc: Include diagnostic.h. (c_common_write_pch): Call global_dc->pch_save. (c_common_read_pch): Call global_dc->pch_restore. gcc/testsuite/ * g++.dg/pch/pr116847.C: New test. * g++.dg/pch/pr116847.Hs: New test.
Diffstat (limited to 'gcc/java')
0 files changed, 0 insertions, 0 deletions