diff options
author | David Malcolm <dmalcolm@redhat.com> | 2020-02-05 15:26:44 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2020-02-11 13:28:25 -0500 |
commit | c46d057f55748520e819dcd8e04bca71be9902b2 (patch) | |
tree | a7c1e73a40adf4c605561c446f27600d564154d6 /gcc/analyzer/ChangeLog | |
parent | a5e3dd5d2e0073f585fa97d6b961752432c3d122 (diff) |
analyzer: workaround for nested pp_printf
The dumps from the analyzer sometimes contain garbled output.
The root cause is due to nesting of calls to pp_printf: I'm using
pp_printf with %qT to print types with a PP using default_tree_printer.
default_tree_printer handles 'T' (and various other codes) via
dump_generic_node (pp, t, 0, TDF_SLIM, 0);
and dump_generic_node can call pp_printf in various ways, leading
to a pp_printf within a pp_printf, and garbled output.
I don't think it's feasible to fix pp_printf to be reentrant, in
stage 4, at least, so for the moment this patch works around it
in the analyzer.
gcc/analyzer/ChangeLog:
* region-model.cc (print_quoted_type): New function.
(svalue::print): Use it to replace %qT.
(region::dump_to_pp): Likewise.
(region::dump_child_label): Likewise.
(region::print_fields): Likewise.
Diffstat (limited to 'gcc/analyzer/ChangeLog')
-rw-r--r-- | gcc/analyzer/ChangeLog | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog index 4dace2d16c8..57fee4c5bfe 100644 --- a/gcc/analyzer/ChangeLog +++ b/gcc/analyzer/ChangeLog @@ -1,3 +1,11 @@ +2020-02-11 David Malcolm <dmalcolm@redhat.com> + + * region-model.cc (print_quoted_type): New function. + (svalue::print): Use it to replace %qT. + (region::dump_to_pp): Likewise. + (region::dump_child_label): Likewise. + (region::print_fields): Likewise. + 2020-02-10 David Malcolm <dmalcolm@redhat.com> PR analyzer/93659 |