* cp-tree.h (init_error): Remove declaration.
* error.c (scratch_pretty_printer): Rename to ...
(actual_pretty_printer): ... this.
(cxx_pp): Constify and update accordingly.
(init_error): Remove definition.
* lex.c (cxx_init): Do not call init_error.
From-SVN: r224037
+2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
+
+ * cp-tree.h (init_error): Remove declaration.
+ * error.c (scratch_pretty_printer): Rename to ...
+ (actual_pretty_printer): ... this.
+ (cxx_pp): Constify and update accordingly.
+ (init_error): Remove definition.
+ * lex.c (cxx_init): Do not call init_error.
+
2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61683
extern bool cp_omp_mappable_type (tree);
/* in error.c */
-extern void init_error (void);
extern const char *type_as_string (tree, int);
extern const char *type_as_string_translate (tree, int);
extern const char *decl_as_string (tree, int);
tree -> string functions that are occasionally called from the
debugger or by the front-end for things like
__PRETTY_FUNCTION__. */
-static cxx_pretty_printer scratch_pretty_printer;
-static cxx_pretty_printer * cxx_pp = &scratch_pretty_printer;
+static cxx_pretty_printer actual_pretty_printer;
+static cxx_pretty_printer * const cxx_pp = &actual_pretty_printer;
/* Translate if being used for diagnostics, but not for dump files or
__PRETTY_FUNCTION. */
diagnostic_format_decoder (context) = cp_printer;
}
-/* Initialize the global cxx_pp that is used as the memory store for
- the string representation of C++ AST. See the description of
- cxx_pp above. */
-
-void
-init_error (void)
-{
- new (cxx_pp) cxx_pretty_printer ();
-}
-
/* Dump a scope, if deemed necessary. */
static void
init_cp_semantics ();
init_operators ();
init_method ();
- init_error ();
current_function_decl = NULL;