aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@integrable-solutions.net>2013-08-22 10:14:46 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2013-08-22 10:14:46 +0000
commitda6ca2b5ee8cf03215697da17fd7f1a4f21bf2ba (patch)
tree022ef428c3c313c44d9026f48348fe881e59ba87 /gcc/cp/error.c
parent0e1474e5a6b808f10e251e2e1f3519f9f291d093 (diff)
downloadgcc-da6ca2b5ee8cf03215697da17fd7f1a4f21bf2ba.zip
gcc-da6ca2b5ee8cf03215697da17fd7f1a4f21bf2ba.tar.gz
gcc-da6ca2b5ee8cf03215697da17fd7f1a4f21bf2ba.tar.bz2
pretty-print.h (output_buffer::output_buffer): Declare.
* pretty-print.h (output_buffer::output_buffer): Declare. (pretty_printer::pretty_printer): Likewise. (pp_construct): Remove. * pretty-print.c (output_buffer::output_buffer): Define. (pretty_printer::pretty_printer): Rename from pp_construct. Simplify. * gimple-pretty-print.c (print_gimple_stmt): Do not call pp_construct. (print_gimple_expr): Likewise. (print_gimple_seq): Likewise. (gimple_dump_bb): Likewise. * sched-vis.c (dump_value_slim): Likewise. (dump_insn_slim): Likewise. (dump_rtl_slim): Likewise. (str_pattern_slim): Likewise. * tree-mudflap.c (mf_varname_tree): Likewise. * graph.c (print_graph_cfg): Likewise. (start_graph_dump): Likewise. * tree-pretty-print.c (maybe_init_pretty_print): Likewise. Use placement-new. * diagnostic.c (diagnostic_initialize): Simplify early diagnostic pretty printer initialization. * coretypes.h (diagnostic_context): Remove superflous type alias declaration. (pretty_printer): Likewise. Declare directly as a class. (pretty_print_info): Remove declaration as class. * asan.c (asan_emit_stack_protection): Remove call to pp_construct and pp_clear_output_area. (asan_add_global): Likewise. c/ * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty printer initialization. c-family/ * c-pretty-print.h (pp_c_pretty_printer_init): Remove. (c_pretty_printer::c_pretty_printer): Declare. * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from c_pretty_printer_init. Adjust. (print_c_tree): Do not call c_pretty_printer_init. * c-ada-spec.c (dump_ads): Remove call to pp_construct. cp/ * error.c (init_error): Remove calls to pp_construct and pp_cxx_pretty_printer_init. Initialize cxx_pp with placement-new. * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare. (cxx_pretty_printer_init): Remove. * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Rename from cxx_pretty_printer_init. Adjust. * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify initialization of C++ diagnostics pretty printer. From-SVN: r201918
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 1fdc8906..a930803 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -33,6 +33,8 @@ along with GCC; see the file COPYING3. If not see
#include "pointer-set.h"
#include "c-family/c-objc.h"
+#include <new> // For placement-new.
+
#define pp_separate_with_comma(PP) pp_cxx_separate_with (PP, ',')
#define pp_separate_with_semicolon(PP) pp_cxx_separate_with (PP, ';')
@@ -109,8 +111,7 @@ init_error (void)
diagnostic_finalizer (global_dc) = cp_diagnostic_finalizer;
diagnostic_format_decoder (global_dc) = cp_printer;
- pp_construct (cxx_pp, NULL, 0);
- pp_cxx_pretty_printer_init (cxx_pp);
+ new (cxx_pp) cxx_pretty_printer ();
}
/* Dump a scope, if deemed necessary. */