[Bug analyzer/93276] Build error of current trunk indicating "#pragma GCC diagnostic not allowed inside functions"

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 29 08:37:00 GMT 2020


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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:7892ff37f407ef47ee852f281a80fa0dba6a5a67

commit r10-6313-g7892ff37f407ef47ee852f281a80fa0dba6a5a67
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Jan 29 09:36:19 2020 +0100

    analyzer: fix build with gcc 4.4 (PR 93276)

    All that is really needed is make sure you #include "diagnostic-core.h"
    before including pretty-print.h.  By including
    diagnostic-core.h first, you do:
    and then pretty-print.h will do:
    If instead pretty-print.h is included first, then it will use __gcc_diag__
    instead of __gcc_tdiag__ and thus will assume %E/%D etc. can't be handled.

    2020-01-29  Jakub Jelinek  <jakub@redhat.com>

        * analyzer.h (PUSH_IGNORE_WFORMAT, POP_IGNORE_WFORMAT): Remove.
        * constraint-manager.cc: Include diagnostic-core.h before graphviz.h.
        (range::dump, equiv_class::print): Don't use PUSH_IGNORE_WFORMAT or
        POP_IGNORE_WFORMAT.
        * state-purge.cc: Include diagnostic-core.h before
        gimple-pretty-print.h.
        (state_purge_annotator::add_node_annotations, print_vec_of_names):
        Don't use PUSH_IGNORE_WFORMAT or POP_IGNORE_WFORMAT.
        * region-model.cc: Move diagnostic-core.h include before graphviz.h.
        (path_var::dump, svalue::print, constant_svalue::print_details,
        region::dump_to_pp, region::dump_child_label, region::print_fields,
        map_region::print_fields, map_region::dump_dot_to_pp,
        map_region::dump_child_label, array_region::print_fields,
        array_region::dump_dot_to_pp): Don't use PUSH_IGNORE_WFORMAT or
        POP_IGNORE_WFORMAT.


More information about the Gcc-bugs mailing list