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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathaniel Shead <nsh...@gcc.gnu.org>:

https://gcc.gnu.org/g:fd599d96d464caed8bf78e4a43120d9a121b7e7a

commit r15-2334-gfd599d96d464caed8bf78e4a43120d9a121b7e7a
Author: Nathaniel Shead <nathanielosh...@gmail.com>
Date:   Sun Jul 7 13:56:25 2024 +1000

    c++/modules: Stream warning suppressions [PR115757]

    Currently we don't stream the contents of 'nowarn_map'; this means that
    warning suppressions don't get applied in importers, which is
    particularly relevant for templates (as in the linked testcase).

    Rather than streaming the whole contents of 'nowarn_map', this patch
    instead just streams the exported suppressions for each tree node
    individually, to not build up additional locations and suppressions for
    tree nodes that do not need to be streamed.

            PR c++/115757

    gcc/cp/ChangeLog:

            * module.cc (trees_out::core_vals): Write warning specs for
            DECLs and EXPRs.
            (trees_in::core_vals): Read warning specs.

    gcc/ChangeLog:

            * tree.h (put_warning_spec_at): Declare new function.
            (has_warning_spec): Likewise.
            (get_warning_spec): Likewise.
            (put_warning_spec): Likewise.
            * diagnostic-spec.h (nowarn_spec_t::from_bits): New function.
            * diagnostic-spec.cc (put_warning_spec_at): New function.
            * warning-control.cc (has_warning_spec): New function.
            (get_warning_spec): New function.
            (put_warning_spec): New function.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/warn-spec-1_a.C: New test.
            * g++.dg/modules/warn-spec-1_b.C: New test.

    Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>
  • [Bug c++/115757] [modules] mayb... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to