analyzer: fix build with gcc 4.4 (PR 93276)
authorJakub Jelinek <jakub@redhat.com>
Wed, 29 Jan 2020 08:36:19 +0000 (09:36 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 29 Jan 2020 08:36:19 +0000 (09:36 +0100)
commit7892ff37f407ef47ee852f281a80fa0dba6a5a67
tree1cd63cc7cff877b9188b8544403c5ba8975d5646
parent148018bc3fe7ce47d005a1c5f7b6dd044024a4af
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.
gcc/analyzer/ChangeLog
gcc/analyzer/analyzer.h
gcc/analyzer/constraint-manager.cc
gcc/analyzer/region-model.cc
gcc/analyzer/state-purge.cc