PR jit/63854: Fix double-initialization within tree-pretty-print.c
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 4 Dec 2014 21:23:57 +0000 (21:23 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Thu, 4 Dec 2014 21:23:57 +0000 (21:23 +0000)
commitc8a15f362a905e13b382c027b959ea1114a645b4
tree861faf8e8499fd13d98a465e9c7db178fb34dbbc
parent953971cf7dd11ab68caec04cae767f5dde656b23
PR jit/63854: Fix double-initialization within tree-pretty-print.c

gcc/ChangeLog:
PR jit/63854
* tree-pretty-print.c: Eliminate include of <new>.
(buffer): Convert this variable from a pretty_printer to a
pretty_printer *.
(initialized): Eliminate this variable in favor of the NULL-ness
of "buffer".
(print_generic_decl): Update for "buffer" becoming a pointer.
(print_generic_stmt): Likewise.
(print_generic_stmt_indented): Likewise.
(print_generic_expr): Likewise.
(maybe_init_pretty_print): Likewise, allocating "buffer" on the
heap and using its non-NULL-ness to ensure idempotency.

From-SVN: r218404
gcc/ChangeLog
gcc/tree-pretty-print.c